Asset Downloads

An assetDownload resource is created as a result of a user requesting to download an asset.

Creating an Asset Download

POST /v1/downloads

Payload

A JSON with following properties:

  • asset (String): ID of the asset to download.
  • config: An object with (optional):
    • highpoly (Boolean): Whether or not to include the highpoly. (Optional and valid for 3D objects only)
    • lowerlod_meshes (Boolean): Whether or not include the meshes lower than that of maxlod. (Optional and valid for 3D objects only)
    • lowerlod_normals (Boolean): Whether or not include the normals corresponding to LODs lower than that of maxlod. (Optional and valid for 3D objects only)
    • ztool (Boolean): Whether or not include ZTool mesh file. (Optional and valid for 3D objects only)
    • brushes (Boolean): Whether or not to include the brush files. (Optional and valid for 3D objects only)
    • maxlod (Number): The maximum LOD mesh file to include, defined in the form of number of tris. (Optional and valid for 3D objects only)
    • meshMimeType (String): The mime-type of the mesh file to download, one of “application/x-obj” or “application/x-fbx”. (Optional and valid for 3D objects only)
  • components: An array of objects, each with:
    • type (String): Type of component, e.g. “albedo”, “normal”, etc.
    • physicalSize (String): The {width}x{height} physical size version of the asset to download, e.g., “2x2”, etc.
    • resolution (String): The {width}x{height} resolution of the asset to download, e.g, “2048x2048”, etc.
    • mimeType (String): One of “image/jpeg” or “image/x-exr” to download the components in.

Response

The response is hydrated with signed URLs for downloading each of the individual asset components, meshes, and preview files, and the metadata file. To avoid the inconvenience of handling multiple file downloads on the client for each asset, we provide a downloading service that zips all the files and downloads a single file. See downloading assets for more information.

{
  "id": "46ca2eba52ff4f1999f06be94621d98b",
  "user": "some@user.ocom",
  "asset": "pjBjO0",
  "time": "2017-01-06T13:37:01.294Z",
  "expires": "2017-01-06T13:52:01.294Z",
  "license": "indie",
  "config": null,
  "paying": true,
  "components": [
    {
      "type": "ao",
      "mimeType": "image/jpeg",
      "resolution": "256x256",
      "physicalSize": "1x1",
      "uri": "DOWNLOAD_URL",
      "contentLength": "33523"
    }
  ],
  "json": {
    "uri": "DOWNLOAD_URL",
    "contentLength": "27051"
  },
  "previews": [
    {
      "uri": "DOWNLOAD_URL",
      "tags": [
        "thumb"
      ],
      "resolution": "360x360",
      "contentLength": "295166"
    },
    ...
  ]
}

Getting an Asset Download

GET /v1/downloads/{id}

Updated: