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.

RequestResponse
PUT /api/fetchjobs/:fetchJobsId

Replace these placeholders:

Placeholder

Description

:fetchJobId

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

condition

String

The system description of the current state of the job.

file_count

Int

The amount of files that are currently in the fetch job.

scope

String

Value of the scope in the fetch job.

state

String

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 Cancelled on the condition that the current value is Pending

state_description

String

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

RequestResponse
{
  "condition":"Success",
  "file_count":"1",
  "state":"Cancelled",
  "scope":"data_import",
  "state_description":"Job completed"
}

Response

Response

Body

204 No Content

Returns an empty body when everything was processed without errors. It doesn't check whether the state value has been processed as intended.

403 Forbidden

Returns the error message when the updated value couldn't be processed, usually because of missing parameters in the body.

Response examples

RequestResponse
Status: 204 No Content
RequestResponse
Status: 403 Forbidden

{
  "Message": "Only the 'Job.State' property can be changed."
}

Do you have some feedback for us?

If you have suggestions for improving this article,