Moved wiki to main repository instead of wiki as this is a documentation repository.

This commit is contained in:
Mark van der Wal
2020-05-05 20:45:25 +02:00
parent 1315978043
commit a48f5c9625
20 changed files with 2113 additions and 2 deletions

55
Polling-task-status.md Normal file
View File

@@ -0,0 +1,55 @@
## Polling task status
When a task is executed with the task API your retrieve a code.
This code can be used to poll the status of an item task execution.
The response 'message' field can contain a string message based on the context.
#### Get a list task of status for a given item
> Request
```javascript
GET /api/v1/items/{code}/tasks
```
> Response 200 OK
```javascript
[
{
"taskType": "string",
"code": "string",
"message": "string",
"state": "Error, Ok, Scheduled, Processing",
"started": "2020-03-20T11:13:20.568Z",
"finished": "2020-03-20T11:13:20.568Z"
},
{
"taskType": "string",
"code": "string",
"state": "Error, Ok, Scheduled, Processing",
}
]
```
Response 401 Not authenticated
Response 403 No READ permissions in parent item
Response 404 Parent Item not found
#### Get the status of a task for a given item and item task code
> Request
```javascript
GET /api/v1/items/{code}/tasks/{itemTaskCode}
```
> Response 200 OK
```javascript
{
"taskType": "string",
"code": "string",
"message": "string",
"state": "Error, Ok, Scheduled, Processing",
"started": "2020-03-20T11:13:20.568Z",
"finished": "2020-03-20T11:13:20.568Z"
}
```
Response 401 Not authenticated
Response 403 No READ permissions in parent item
Response 404 Parent Item not found