Vridlo/api/vridlo.assemblers.tasks

vridlo.assembler.tasks
It allows accessing to a list of tasks, which are presented in the system. Do not poll this method more than once an hour. Added into API v1.0.

GET:/v1/assembler/ /tasks.json
Returns a list of tasks, which are presented in the system. Do not poll this method more than once an hour. Added into API v1.0.

Authentication
This method requires NO authentication.

Inline Arguments
The assembler slug
 * slug is string

Arguments
NOTE: Arguments can be provided as arguments along with headers fields.

Number of items to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 50. The page of results to return. If this argument is omitted, it defaults to 1.
 * per_page (Optional)
 * page (Optional)

Example Request Url
GET:/v1/assembler/core/tasks.json

Example Good Response
[  {      "no": 100000, "uri": "http://git.altlinux.org/tasks/100000", "state": "DONE", "shared": true, "test": false, "try": 1, "iteration": 1, "owner_slug": "user", "assembler_slug": "core", "source_path_slug": "p8_core", "changed_at": "1574870479", "exercise_count": 0, } ]

Example Bad Response
Error response 416:

{  "message": "Error text according the active language", }

Return Codes
The resource list is accessible. Returned data responds to the current state of the resource list, and reading the list is finished.
 * 200 (OK)

The resource list is accessible. Returned data responds to the current state of the resource list, and reading the list is NOT finished yet.
 * 206 (Partial Content)

The resource list is accessible. But data can't be returned since range provided don't match the list boundaries.
 * 416 (Range Not Satisfiable)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The requested service is temporarily unavailable.
 * 500 (Service currently unavailable)

POST:/v1/assembler/ /tasks.json
Creates the task using the set of properties passed as form data or get parameter array, and returns state of the created record as JSON. Added into API v1.0.

Authentication
This method requires authenticated user with write task permissions token to task model.

Inline Arguments
The assembler slug
 * slug is string

Arguments
Integer number of the task for the specified assebler. Must be unique among the task names for the specified assember, and contains only digits. Slug of user, which is the task owner. The user MUST be presented. Slug of the source path for the task. The source path MUST be presented. External URI of the task. Can be blank, defaulting to blank. Is it the shared task, defaulting to false Is it the the test only task, defaulting to true Time of changing the task, can be in any of known RFC format, defaulting to now on server side
 * no is integer (Mandatory)
 * owner_slug is string (Mandatory)
 * source_path_slug is string (Mandatory)
 * uri is uri (Optional)
 * shared is boolean (Optional)
 * test is boolean (Optional)
 * changed_at is time (Optional)

Example Request Url
POST:/v1/assembler/core/tasks.json?no=100000&uri="http://git.altlinux.org/tasks/100000"&shared=false&test=false&owner_slug=user&source_path_slug=sisyphus_core&changed_at=1574870479

Example Request Form
POST:/v1/assembler/core/tasks.json DATA: {   "no": 100000, "uri": "http://git.altlinux.org/tasks/100000", "shared": false, "test": false, "owner_slug": "user", "source_path_slug": "sisyphus_core", "changed_at": "1574870479", }

Example Good Response
Good response with created record:

{   "no": 100000, "uri": "http://git.altlinux.org/tasks/100000", "state": "NEW", "shared": false, "test": false, "try": 1, "iteration": 1, "owner_slug": "user", "assembler_slug": "core", "source_path_slug": "sisyphus_core", "changed_at": "2019-11-27 19:01:19 +0300", "exercise_count": 0, }

Example Bad Response
Error response 423:

{  "error_code": 3, "message": "Error text according the active language", }

Return Codes
The resource wasn't found, and was created. Returned data responds to the current state of the resource.
 * 200 (OK)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The incoming data is invalid. See details for help.
 * 422.5 (Invalid incoming data)

The record with provided slug is not found.
 * 404 (Not Found)

The Internal Server Error has occurred.
 * 500 (Internal Server Error)

GET:/v1/assembler/ /tasks/.json
Gets properties of the task specified by URI-parameter, and returns then as JSON. Do not poll this method more than once an hour. Added into API v1.0.

Authentication
This method requires NO authentication.

Inline Arguments
The assembler slug Integer number of the task for the specified assembler.
 * slug is string
 * no is integer

Arguments
This method requires NO arguments.

Example Request Url
GET:/v1/assembler/core/tasks/100000.json

Example Good Response
Good response with returned record:

{   "no": 100000, "uri": "http://git.altlinux.org/tasks/100000", "state": "NEW", "shared": false, "test": false, "try": 1, "iteration": 1, "owner_slug": "user", "assembler_slug": "core", "source_path_slug": "sisyphus_core", "changed_at": "2019-11-27 19:01:19 +0300", "exercise_count": 0, }

Example Bad Response
Error response 423:

{  "error_code": 3, "message": "Error text according the active language", }

Return Codes
The resource was found and is accessible. Returned data responds to the current state of the resource.
 * 200 (OK)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The record with provided slug is not found.
 * 404 (Not Found)

The Internal Server Error has occurred.
 * 500 (Internal Server Error)

PATCH:/v1/assembler/ /tasks/.json
Overwrites one or many specified only properties of the task specified by URI-parameter, and returns updated state as JSON. Added into API v1.0.

Authentication
This method requires write authentication with write task token to task model.

Inline Arguments
The assembler slug Integer number of the task for the specified assembler.
 * slug is string
 * no is integer

Arguments
External URI of the task. Can be blank, defaulting to blank. Is it the shared task, defaulting to false Is it the the test only task, defaulting to true Time of changing the task, can be in any of known RFC format, defaulting to now on server side
 * uri is uri (Optional)
 * shared is boolean (Optional)
 * test is boolean (Optional)
 * changed_at is time (Optional)

Example Request Url
PATCH:/v1/assembler/core/tasks/100000.json?shared=true

Example Request Form
PATCH:/v1/assembler/core/tasks/100000.json DATA: {   "shared": true, }

Example Good Response
Good response with updated record:

{   "no": 100000, "uri": "http://git.altlinux.org/tasks/100000", "state": "NEW", "shared": true, "test": false, "try": 1, "iteration": 1, "owner_slug": "user", "assembler_slug": "core", "source_path_slug": "sisyphus_core", "changed_at": "2019-11-27 19:01:19 +0300", "exercise_count": 0, }

Example Bad Response
Error response 423:

{  "error_code": 3, "message": "Error text according the active language", }

Return Codes
The resource was found and is accessible. Changes were made on the resource successfully. Returned data responds to the current state of the resource.
 * 200 (OK)

The resource was found and is accessible. But no changes were made on the resource.
 * 204 (No Content)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The incoming data is invalid. See details for help.
 * 422.5 (Invalid incoming data)

The record with provided id/slug is not found.
 * 404 (Not Found)

The Internal Server Error has occurred.
 * 500 (Internal Server Error)

DELETE:/v1/assembler/ /tasks/.json
Destroys the task specified by URI-parameter, and returns state of the destroyed record as JSON. Added into API v1.0.

Authentication
This method requires write authentication with write task token to task model.

Inline Arguments
The assembler slug Integer number of the task for the specified assembler.
 * slug is string
 * no is integer

Arguments
This method requires NO arguments.

Example Request Url
DELETE:/v1/assembler/core/tasks/100000.json

Example Good Response
Good response returning deleted record:

{   "no": 100000, "uri": "http://git.altlinux.org/tasks/100000", "state": "NEW", "shared": true, "test": false, "try": 1, "iteration": 1, "owner_slug": "user", "assembler_slug": "core", "source_path_slug": "sisyphus_core", "changed_at": "2019-11-27 19:01:19 +0300", "exercise_count": 0, }

Example Bad Response
Error response 423:

{  "error_code": 3, "message": "Error text according the active language", }

Return Codes
The resource was found and is accessible, and successfully destroyed. Returned data responds to the state of the destroyed resource.
 * 200 (OK)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The record with provided slug is not found.
 * 404 (Not Found)

The Internal Server Error has occurred.
 * 500 (Internal Server Error)