
Contains .inc files which have all the contents of the .rst files but are grouped together for easier editing. Contains parameters.yaml, which has all parameters in one file. Contains request and response samples (JSON and XML) that are pointed to from the .inc files. Change-Id: I42d5451300f95774a3ec4df66bc95cb36795844d
121 lines
1.4 KiB
ReStructuredText
121 lines
1.4 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
==============================
|
|
Tasks (since API v2.2) (tasks)
|
|
==============================
|
|
|
|
Creates, lists, and shows details for tasks.
|
|
|
|
|
|
List tasks
|
|
==========
|
|
|
|
.. rest_method:: GET /v2/tasks
|
|
|
|
Lists tasks.
|
|
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- sort_dir: sort_dir
|
|
- sort_key: sort_key
|
|
- type: type
|
|
- status: status
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- status: status
|
|
- tasks: tasks
|
|
- type: type
|
|
- id: id
|
|
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ../samples/tasks-list-response.json
|
|
:language: javascript
|
|
|
|
|
|
|
|
|
|
Create task
|
|
===========
|
|
|
|
.. rest_method:: POST /v2/tasks
|
|
|
|
Creates a task.
|
|
|
|
Error response codes:201,
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ../samples/task-create-request.json
|
|
:language: javascript
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Show task details
|
|
=================
|
|
|
|
.. rest_method:: GET /v2/tasks/{task_id}
|
|
|
|
Shows details for a task.
|
|
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- task_id: task_id
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- status: status
|
|
- type: type
|
|
- id: id
|
|
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ../samples/task-show-response.json
|
|
:language: javascript
|
|
|
|
|
|
|