Update 'Polling-task-status.md'
udpdated item task state description
This commit is contained in:
parent
9bc15fef76
commit
5b72805644
@ -1,55 +1,55 @@
|
|||||||
## Polling task status
|
## Polling task status
|
||||||
|
|
||||||
When a task is executed with the task API your retrieve a code.
|
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.
|
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.
|
The response 'message' field can contain a string message based on the context.
|
||||||
|
|
||||||
#### Get a list task of status for a given item
|
#### Get a list task of status for a given item
|
||||||
> Request
|
> Request
|
||||||
```javascript
|
```javascript
|
||||||
GET /api/v1/items/{code}/tasks
|
GET /api/v1/items/{code}/tasks
|
||||||
```
|
```
|
||||||
|
|
||||||
> Response 200 OK
|
> Response 200 OK
|
||||||
```javascript
|
```javascript
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"taskType": "string",
|
"taskType": "string",
|
||||||
"code": "string",
|
"code": "string",
|
||||||
"message": "string",
|
"message": "string",
|
||||||
"state": "Error, Ok, Scheduled, Processing",
|
"state": "0, 1, 2 or 3", // Error, Ok, Scheduled, Processing
|
||||||
"started": "2020-03-20T11:13:20.568Z",
|
"started": "2020-03-20T11:13:20.568Z",
|
||||||
"finished": "2020-03-20T11:13:20.568Z"
|
"finished": "2020-03-20T11:13:20.568Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"taskType": "string",
|
"taskType": "string",
|
||||||
"code": "string",
|
"code": "string",
|
||||||
"state": "Error, Ok, Scheduled, Processing",
|
"state": "Error, Ok, Scheduled, Processing",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
Response 401 Not authenticated
|
Response 401 Not authenticated
|
||||||
Response 403 No READ permissions in parent item
|
Response 403 No READ permissions in parent item
|
||||||
Response 404 Parent Item not found
|
Response 404 Parent Item not found
|
||||||
|
|
||||||
#### Get the status of a task for a given item and item task code
|
#### Get the status of a task for a given item and item task code
|
||||||
> Request
|
> Request
|
||||||
```javascript
|
```javascript
|
||||||
GET /api/v1/items/{code}/tasks/{itemTaskCode}
|
GET /api/v1/items/{code}/tasks/{itemTaskCode}
|
||||||
```
|
```
|
||||||
|
|
||||||
> Response 200 OK
|
> Response 200 OK
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"taskType": "string",
|
"taskType": "string",
|
||||||
"code": "string",
|
"code": "string",
|
||||||
"message": "string",
|
"message": "string",
|
||||||
"state": "Error, Ok, Scheduled, Processing",
|
"state": "0, 1, 2 or 3", // Error, Ok, Scheduled, Processing
|
||||||
"started": "2020-03-20T11:13:20.568Z",
|
"started": "2020-03-20T11:13:20.568Z",
|
||||||
"finished": "2020-03-20T11:13:20.568Z"
|
"finished": "2020-03-20T11:13:20.568Z"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Response 401 Not authenticated
|
Response 401 Not authenticated
|
||||||
Response 403 No READ permissions in parent item
|
Response 403 No READ permissions in parent item
|
||||||
Response 404 Parent Item not found
|
Response 404 Parent Item not found
|
Loading…
Reference in New Issue
Block a user