Create a fetch job
You use a create fetch job object to request the creation of a new fetch job. The following properties are required:
|
Parameter |
Type |
Description |
|---|---|---|
|
|
String |
Description of the current state of the job. This parameter needs to be set but can be empty ( |
|
|
Link to the asset entity that receives the files. | |
|
|
Array. <file> |
Array of file objects that describe where to retrieve the files to add to the asset. |
Each of the file objects should have the following properties:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The type of source to retrieve the file from, such as |
|
|
String |
The URL of the resource. |
|
|
Boolean |
Optional parameter that determines whether to delete the file when the fetch job is done. For an HTTP resource, a |
Fetch source
You can use the Web fetch source to retrieve resources that are accessible from a URL (optionally pre-signed). The file name is retrieved from the Content-Disposition header if available or made up from the path. The href member specifies the URL to the resource.
The following example is a fetch job object that fetches two files and links them to an asset:
{
"asset":{
"href":"http://server/api/entities/23"
},
"files":[
{
"type":"Web",
"href":"http://server/path/file1.jpg"
},
{
"type":"Web",
"href":"http://server/path/file2.jpg",
"delete_when_done":true
}
]
}