This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true to the request query parameters.
Creates a new ExportJob either from an existing Document or using the content generated by a GenerationJob. If an ExportJob succeeds, it will produce a File that can be downloaded.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:notepad-export.
booleanoptionalEnables the use of preview functionality.
objectunionDefines the source of contents for an ExportJob
unionThe target format that the job will export to.
objectstringThe unique identifier for an ExportJob
unionThe status of an export job
1
2
3
4
5
curl -X POST \
\t-H "Content-type: application/json" \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/notepad/exportJobs/create?preview=true" \
-d ''1
2
3
4
5
6
{
"rid": "ri.notepad.main.export-job.ef32c039-353c-4555-9704-eacfdfaa2c1c",
"status": {
"type": "running"
}
}| Error Name | ||
|---|---|---|
Generation | Error Code | FAILED_PRECONDITION |
| Status Code | 500 | |
| Description | The operation cannot be completed because the generation job has failed status. | |
| Parameters | generationJobRid | |
Generation | Error Code | FAILED_PRECONDITION |
| Status Code | 500 | |
| Description | The operation cannot be completed because the generation job has running status. | |
| Parameters | generationJobRid | |
Document | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested document was not found. | |
| Parameters | documentRid | |
Export | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The user does not have export permissions on this Document. | |
| Parameters | documentRid | |
Export | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The user does not have export permissions on this GenerationJob. | |
| Parameters | generationJobRid | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The provided user locale is not valid. | |
| Parameters | userLocale | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The provided timezone is not valid. | |
| Parameters | userTimezone | |
Create | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not create the ExportJob. | |
| Parameters | | |
Generation | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given GenerationJob could not be found. | |
| Parameters | generationJobRid, templateRid | |
See Errors for a general overview of errors in the platform.