Export Library Documents
Creates a job to copy a document from the library. The Copy Artifact from Library (Export Library Document) job copies the content of a library document to the default download location, where you can download it to your local computer. Using REST APIs allows you to automate the tasks of exporting documents and downloading them.
You can use the Inbox/Outbox Explorer to view the details of the copied file. Use the Download REST API to download the file.
Using this REST API requires prerequisites, such as understanding how to use jobs. See Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs. For additional details, see Job Types.
Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for EPM Cloud REST APIs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional parameters that are common to all jobs, see Execute a Job.
Table 8-36 Parameters
Name | Description | Required | Default |
---|---|---|---|
jobType |
Copy Artifact From Library or Export Library Document or COPY_ARTIFACT_FROM_LIBRARY (all values are supported) | Yes | None |
jobName |
The name of this job. Example: Copy_Quarterly_Sales | No | Export Library Document |
idOrFullyQualifiedName |
The name of the document. This can be the document name with a fully qualified path or UUID. | Yes | None |
saveAsFile |
The output file name, in the default download location, to which
the document should be copied. If you don’t provide the
extension in The default output file name is the name of the document. The extension of the document is used as the extension of the output file name. |
No | Name of the document |
overwrite |
If a file with the same name exists in the default download
location, the file will not be overwritten by default unless the
overwrite flag is passed as
true .
|
No | false |
errorFile |
The error file name, in the default download location, which contains the details (including errors) of the operation. Any existing error file with the same name is overwritten. If you don’t provide the extension in Use the Inbox/Outbox Explorer to view the details of the error file. Use the Download REST API to download the file. |
No | None |
exportFormat |
The format of the copied document. Allowed values are
|
No | file |
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload Example
Copies a document called WeeklySales.txt
, identified with the
complete path of the document, to the default download location and compresses it.
The output file name will be WeeklySales.zip
. If a file with the
same name exists in the Inbox/Outbox, the existing file will be overwritten. An
error file with the name WeeklySalesErrorLog.log
will be created
with the details of the activity.
{
"jobType": "COPY_ARTIFACT_FROM_LIBRARY",
"jobName": "Copy Invalid SKU Q1 List",
"parameters":
{
"artifactName": "Library/folder1/WeeklySales.txt",
"saveAsFile": "WeeklySales.txt",
"overwrite": "true",
"errorFile": "WeeklySalesErrorLog.log",
"exportFormat": "zip"
}
}