Download orders API (v1.0)

Use the Download orders API to create and retrieve download orders. A download order is a compressed file that contains media files, such as images, vectors, or videos.

Authentication

To use the Download orders API, you need:

  • The URL of your Content Hub server. You can get this from your Content Hub Administrator. Enter this URL in the {{server}} variable by hovering over the variable in the Try it pane and then clicking Edit.
  • An access token and the client ID. Both are sent with every request. You can create a token through the Content Hub interface or by requesting one to the API itself
Download OpenAPI description
Overview
Languages
Servers
https://{server}/

Download orders

A download order is a compressed file that contains media files along with the download order configuration.

Operations

Retrieve a download order with a specific ID

Request

Retrieves a download order with a specific ID along with download details, such as the target count, whether the order has conversions, who created the order and when, as well as the download status.

Path
idinteger(int64)required

The identifier of the download order.

Headers
If-Modified-Sincestring(date-time)

Optional. The date after which to verify if the download order was modified. If the order was modified, a 304 response code is returned.

curl -i -X GET \
  'https://your-server/api/downloadorders/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'If-Modified-Since: 2019-08-24T14:15:22Z'

Responses

Successful operation

Bodyapplication/json
order_idinteger(int64)

The ID of the download order.

namestring or null

The name of the download order.

target_countinteger(int64)

The number of targets contained in the download order.

has_conversionsboolean

Whether the order contains converted files or not.

created_byobject(Link)

Represents a link to a resource.

created_onstring or null(date-time)

The date the download order was created.

modified_byobject(Link)

Represents a link to a resource.

statusstring or null

The status of the download order, for example, Completed.

download_locationobject(Link)

Represents a link to a resource.

additional_infostring or null

Additional information about the download order.

external_job_referenceobject(Link)

Represents a link to a resource.

targetsobject(Link)

Represents a link to a resource.

culturestring or null

The culture code of the download order, for example en-US.

selfobject(Link)

Represents a link to a resource.

Response
application/json
{ "order_id": 0, "name": "string", "target_count": 0, "has_conversions": true, "created_by": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "created_on": "2019-08-24T14:15:22Z", "modified_by": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "status": "string", "download_location": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "additional_info": "string", "external_job_reference": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "targets": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "culture": "string", "self": { "href": "string", "filename_properties": [], "title": "string", "templated": false } }

Retrieve multiple download orders

Request

Lists the download orders that the current user has access to.

Query
skipinteger(int32)

The number of items to skip for pagination.

curl -i -X GET \
  'https://your-server/api/downloadorders?skip=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
itemsArray of objects or null(DownloadOrderResource)

Gets or sets the list of items.

total_itemsinteger or null(int64)

Gets or sets the total number of items.

returned_itemsinteger or null(int64)

Gets or sets the number of returned items.

offsetinteger or null(int32)

Gets or sets the offset of the items.

nextobject(Link)

Represents a link to a resource.

previousobject(Link)

Represents a link to a resource.

identifierstring or null

Gets or sets the identifier of the resource.

selfobject(Link)

Represents a link to a resource.

property name*anyadditional property
Response
application/json
{ "items": [ {} ], "total_items": 0, "returned_items": 0, "offset": 0, "next": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "previous": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "identifier": "string", "self": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "property1": null, "property2": null }

Create a download order

Request

Creates a download order for the specified assets using the defined download options.

Bodyrequired

A download order request that contains the order details.

orderobject(OrderRequestResource)required

The configuration to create an order.

order.​zip_filenamestring or null

The name of the ZIP file.

order.​globalobject or null

Configuration of what to download by asset media group. For example, the rendition MP4 for all videos, and the medium for all images. Asset media groups are identified by their ID.

order.​individualobject or null

Configuration of what to download for individual assets. To use when willing to download something different for specific assets than for the rest of the assets of the same media group. For example, to download the rendition MP4 for a video asset with ID 1234, while for all other videos, the Original rendition will be downloaded through the global configuration.

target_selectionobject(SelectionResource)

Describes what selection pool to use for an order. The selection pool contains the list of entities to download.

item_name_resolver_idstring or null

The ID of the item name resolver.

culturestring or null

The culture code of the download order, for example, en-US.

namestring or null

The name of the download order.

download_order_typestring(DownloadOrderType)

The type of order, for example, Standard or Custom.

Enum"Standard""Custom"
curl -i -X POST \
  https://your-server/api/downloadorders \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json-patch+json' \
  -d '{
    "target_selection": {
      "selectionPool": "string",
      "subPoolId": 0,
      "definitionName": "string"
    },
    "item_name_resolver_id": "string",
    "culture": "string",
    "name": "string",
    "order": {
      "zip_filename": "string",
      "global": {
        "property1": {
          "renditions": [
            "string"
          ],
          "conversions": [
            [
              {
                "type": "fileExtension",
                "value": {}
              }
            ]
          ],
          "user_rendition_configuration": {
            "label": "string",
            "culture": "string",
            "description": "string"
          },
          "presets": [
            "string"
          ]
        },
        "property2": {
          "renditions": [
            "string"
          ],
          "conversions": [
            [
              {
                "type": "fileExtension",
                "value": {}
              }
            ]
          ],
          "user_rendition_configuration": {
            "label": "string",
            "culture": "string",
            "description": "string"
          },
          "presets": [
            "string"
          ]
        }
      },
      "individual": {
        "property1": {
          "renditions": [
            "string"
          ],
          "conversions": [
            [
              {
                "type": "fileExtension",
                "value": {}
              }
            ]
          ],
          "user_rendition_configuration": {
            "label": "string",
            "culture": "string",
            "description": "string"
          },
          "presets": [
            "string"
          ]
        },
        "property2": {
          "renditions": [
            "string"
          ],
          "conversions": [
            [
              {
                "type": "fileExtension",
                "value": {}
              }
            ]
          ],
          "user_rendition_configuration": {
            "label": "string",
            "culture": "string",
            "description": "string"
          },
          "presets": [
            "string"
          ]
        }
      }
    },
    "download_order_type": "Standard"
  }'

Responses

Created

Bodyapplication/json
order_idinteger(int64)

The ID of the download order.

namestring or null

The name of the download order.

target_countinteger(int64)

The number of targets contained in the download order.

has_conversionsboolean

Whether the order contains converted files or not.

created_byobject(Link)

Represents a link to a resource.

created_onstring or null(date-time)

The date the download order was created.

modified_byobject(Link)

Represents a link to a resource.

statusstring or null

The status of the download order, for example, Completed.

download_locationobject(Link)

Represents a link to a resource.

additional_infostring or null

Additional information about the download order.

external_job_referenceobject(Link)

Represents a link to a resource.

targetsobject(Link)

Represents a link to a resource.

culturestring or null

The culture code of the download order, for example en-US.

selfobject(Link)

Represents a link to a resource.

Response
application/json
{ "order_id": 0, "name": "string", "target_count": 0, "has_conversions": true, "created_by": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "created_on": "2019-08-24T14:15:22Z", "modified_by": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "status": "string", "download_location": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "additional_info": "string", "external_job_reference": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "targets": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "culture": "string", "self": { "href": "string", "filename_properties": [], "title": "string", "templated": false } }

Retrieve a download order target

Request

Retrieves a download order for the specified order and target ID.

Path
orderIdinteger(int64)required

The ID of the download order.

entityIdinteger(int64)required

The ID of the target entity.

curl -i -X GET \
  'https://your-server/api/downloadorders/{orderId}/targets/{entityId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
entityobject(Link)

Represents a link to a resource.

selfobject(Link)

Represents a link to a resource.

Response
application/json
{ "entity": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "self": { "href": "string", "filename_properties": [], "title": "string", "templated": false } }

Retrieve the download order targets

Request

Retrieves the download order targets for the specified order ID.

Path
orderIdinteger(int64)required

The unique identifier of the order.

Query
skipinteger(int32)

The number of items to skip for pagination.

curl -i -X GET \
  'https://your-server/api/downloadorders/{orderId}/targets?skip=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
orderobject(Link)

Represents a link to a resource.

itemsArray of objects or null(DownloadOrderTargetResource)

Gets or sets the list of items.

total_itemsinteger or null(int64)

Gets or sets the total number of items.

returned_itemsinteger or null(int64)

Gets or sets the number of returned items.

offsetinteger or null(int32)

Gets or sets the offset of the items.

nextobject(Link)

Represents a link to a resource.

previousobject(Link)

Represents a link to a resource.

identifierstring or null

Gets or sets the identifier of the resource.

selfobject(Link)

Represents a link to a resource.

property name*anyadditional property
Response
application/json
{ "order": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "items": [ {} ], "total_items": 0, "returned_items": 0, "offset": 0, "next": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "previous": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "identifier": "string", "self": { "href": "string", "filename_properties": [], "title": "string", "templated": false }, "property1": null, "property2": null }