Update a fetch job
Updating a fetch job is currently limited to canceling that job. The fetch job can only be canceled if the value of the state
property at the time of updating equals Pending
. The fetch job can not be deleted.
PUT /api/fetchjobs/:fetchJobsId
Replace these placeholders:
Placeholder |
Description |
---|---|
|
The ID of the fetch job that needs to be updated. |
Body parameters
Although the following body parameters are required, only the state
value will be changed.
Parameter |
Type |
Description |
---|---|---|
|
|
The system description of the current state of the job. |
|
|
The amount of files that are currently in the fetch job. |
|
|
Value of the scope in the fetch job. |
|
|
The current state of the job. This property is currently the only property of the fetch job that can be updated. It can be set to |
|
|
The canonical description of the current state of the job. This value can be skipped if its value is null in the fetch job. |
All parameters are ignored but must be given values matching the fetch job that is being updated or an error will be thrown. This means these values must be retrieved from the fetch job first. Only the state
parameter value is used to update the fetch job.
Body example
{
"condition":"Success",
"file_count":"1",
"state":"Cancelled",
"scope":"data_import",
"state_description":"Job completed"
}
Response
Response |
Body |
---|---|
|
Returns an empty body when everything was processed without errors. It doesn't check whether the |
|
Returns the error message when the updated value couldn't be processed, usually because of missing parameters in the body. |
Response examples
Status: 204 No Content
Status: 403 Forbidden
{
"Message": "Only the 'Job.State' property can be changed."
}