The following REST APIs are available for working with scheduling tasks.
A POST method that schedules a task using the task ID. At any time, there can be only one task in the schedule queue. Also, you must keep a delay of ~1 second in between two consecutive tasks.
http://<FMPS_server>:<port>/v16/queue/scheduleTask/:id
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | The unique ID of the task that you want to schedule. |
5e4302fafdfdfadsfdfasgafsafgsag
Returns a HTTP 200 (Successful) response with scheduled event.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A GET method that retrieves the running ID of a publishing task.
http://<FMPS_server>:<port>/v16/queue/task/running/:id
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | The unique ID of the task that you want to retrieve the running ID for. |
5e4302fafdfdfadsfdfasgafsafgsag
Returns a HTTP 200 (Successful) response with the queue object that contains the running ID of the publishing task.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A POST method that stops a running publishing task.
http://<FMPS_server>:<port>/v16/queue/stopTask
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
runid | String | ID of the running task that you want to stop. |
{"runid":"454654456464"}
Returns a HTTP 200 (Successful) response with an object to terminate the task.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A GET method that retrieves the run object’s ID for a task through its GUID.
http://<FMPS_server>:<port>/v16/queue/task/lastrunguid/:guid
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
guid | String | GUID of the task that is scheduled for running in the publishing queue. |
342342553423425
Returns a HTTP 200 (Successful) response with the run object’s ID for a task that has already started executing. If the task has been scheduled, but it has not yet started, then the following message is returned in a JSON:
Guid is present in the task, but not for the running queue. It is probably scheduled. Please wait.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
404 | String | Task not found for the given GUID. |
A GET method that retrieves all objects present in the running task queue. This includes completed, queued, terminated, or currently running tasks.
http://<FMPS_server>:<port>/v16/queue
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Returns a HTTP 200 (Successful) response with the list of queued objects.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A GET method that retrieves the status of a particular queued object. The queued object’s ID is used to retrieve all details.
http://<FMPS_server>:<port>/v16/queue/:id
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | The unique ID of the queued object that you want to retrieve. |
5e4302fafdfdfadsfdfasgafsafgsag
Returns a HTTP 200 (Successful) response with the queued object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |