Add data to job
POST/jobs/:jobId/data/
Add data (typically a document) to the job. The data is processed immediately by the workflow.
Use the startJob
request to signal that all data has been added to the job.
Note that the query parameter "url" must be used in conjunction with the "application/json" or "application/xml" content.
Request
Path Parameters
The job ID as returned by createJob
.
Query Parameters
The HTTP(S) URL where the file can be downloaded.
If this parameter is used, the Content-Type must be application/json or application/xml and contain only the options.
- multipart/form-data
- application/json
- application/xml
Body
required
Array [
DOC.PASSWORD
: Password used for password protected files. This option can be added multiple times, where all passwords are tried. The list of passwords is also used to open embedded and/or attached files.]
options
option[]
List of processing options
Options can either be set as job options in createJob
or data specific options in addData
. Data specific
options are used to process the respective data and override job options of the same name. It is recommended to
use job options whenever possible.
Unless documented otherwise, each option must be set only once.
Option name
The list of supported options depends on the profile
used. Common names are:
The option's value.
Note that the value must match the type required by the option. Otherwise workflow processing will abort with
an error code option
.
The file/data to be appended to the job.
The Content-Disposition
header must contain either the
filename
or the filename*
parameter.
It is recommended to set a filename with an extension.
Alternatively the MIME type of the data is used to determine its type.
The query parameter "url" is ignored if multipart/form-data content is used.
Body
required
Array [
DOC.PASSWORD
: Password used for password protected files. This option can be added multiple times, where all passwords are tried. The list of passwords is also used to open embedded and/or attached files.]
Option name
The list of supported options depends on the profile
used. Common names are:
The option's value.
Note that the value must match the type required by the option. Otherwise workflow processing will abort with
an error code option
.
Body
required
Array [
DOC.PASSWORD
: Password used for password protected files. This option can be added multiple times, where all passwords are tried. The list of passwords is also used to open embedded and/or attached files.]
Option name
The list of supported options depends on the profile
used. Common names are:
The option's value.
Note that the value must match the type required by the option. Otherwise workflow processing will abort with
an error code option
.
Responses
- 201
- 400
- 404
- 409
- 415
- 427
Successful response to the addData request
- application/json
- application/xml
- Schema
- Example (from schema)
Schema
Unique ID of the data.
This ID is returned by addData
and can be used to associate events and messages
to specific input data. Therefore it is highly recommended to log the data ID in the
client log file.
{
"dataId": "string"
}
- Schema
- Example (from schema)
Schema
Unique ID of the data.
This ID is returned by addData
and can be used to associate events and messages
to specific input data. Therefore it is highly recommended to log the data ID in the
client log file.
<dataId>string</dataId>
-
Request could not be parsed
-
The data is missing
-
The data's filename is missing
-
The options are not valid JSON/XML
-
The file could not be downloaded from the provided URL.
- application/problem+json
- application/problem+xml
- Schema
- Example (from schema)
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
{
"type": "string",
"title": "string",
"status": "string",
"detail": "string"
}
- Schema
- Example (from schema)
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
<root>
<type>string</type>
<title>string</title>
<status>string</status>
<detail>string</detail>
</root>
The job with the specified ID could not be found.
- application/problem+json
- application/problem+xml
- Schema
- Example (from schema)
- jobNotFoundJson
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
{
"type": "string",
"title": "string",
"status": "string",
"detail": "string"
}
{
"type": "http://www.pdf-tools.com/service/rest/errors/jobNotFound",
"title": "Job not found.",
"detail": "The job with ID 'job_XYZ' could not be found",
"status": 404
}
- Schema
- Example (from schema)
- jobNotFoundJson
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
<root>
<type>string</type>
<title>string</title>
<status>string</status>
<detail>string</detail>
</root>
<problem xmlns="urn:ietf:rfc:7807">
<type>http://www.pdf-tools.com/service/rest/errors/jobNotFound</type>
<title>Job not found.</title>
<detail>The job with ID 'job_XYZ' could not be found</detail>
<status>404</status>
</problem>
The job has already been started or canceled.
- application/problem+json
- application/problem+xml
- Schema
- Example (from schema)
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
{
"type": "string",
"title": "string",
"status": "string",
"detail": "string"
}
- Schema
- Example (from schema)
Schema
A URI reference that identifies the problem type. Note that this URI cannot be dereferenced.
A short, human-readable summary of the problem type.
The HTTP status code.
A human-readable explanation specific to this occurrence of the problem.
<root>
<type>string</type>
<title>string</title>
<status>string</status>
<detail>string</detail>
</root>
-
The content type is not multipart/form-data, application/json or application/xml
-
The content type of the options field in the multipart/form-data content is not application/json
Problem with option data