v1

latestOpenAPI 3.0.02026-07-2417611.8 MB
Authoring renditions

Create a new rendition.

Use this endpoint to create a new rendition. The rendition will have resizing parameters applied before the crop is conducted. The generated rendition link will depend on the parameters provided. The scale parameter is required to resize. LocationX, locationY, width and height parameters are required to crop.<br />User roles: admin, manager, editor

post/authoring/v1/renditions

Query parameters

fieldsstring[]

Only the rendition fields that are specified here are returned for each result. Any renditions field is a valid value and these can be specified in a comma-separated list. For example, to list the renditions fields name and ID, provide the value ID, and name. All renditions fields are returned by default.

includestring[]

Additional renditions fields that are specified here are returned. Currently, only the links field can be included. Fields are to be provided as a comma-separated list.

projectIdstring

The id of the project that the rendition's underlying asset resides in. This property must be provided if the asset is in a project. This includes projects with id of "draft".

Request body

locationXinteger

Offset from the top left corner in the x dimension for where the crop will begin

locationYinteger

Offset from the top left corner in the y dimension for where the crop will begin

widthinteger

Width of the crop

heightinteger

Height of the crop

scalenumber

Size image will be scaled to

idstring

The id of the rendition to create

Example request

{
  "locationX": 50,
  "locationY": 100,
  "width": 200,
  "height": 200,
  "scale": 1.5,
  "asset": {
    "id": "27c621ed48921b7338b84b4f415cba6b"
  },
  "id": "0a800487f06d71eaf4cffdfde1ab28bc"
}

Response

Successfully created a new rendition.

locationXinteger

Offset from the top left corner in the x dimension for where the crop will begin

locationYinteger

Offset from the top left corner in the y dimension for where the crop will begin

widthinteger

Width of the crop

heightinteger

Height of the crop

scalenumber

Size image will be scaled to

idstring required

The id of the rendition

revstring required

The revision of the rendition

classification'rendition' required

The classification of a rendition is always "rendition"

fileNamestring required

File name of the resource

mediaTypestring required

Media type of the resource

resourcestring required

the id of the uploaded resource this rendition is for

Example response

{
  "locationX": 50,
  "locationY": 100,
  "width": 200,
  "height": 200,
  "scale": 1.5,
  "asset": {
    "id": "27c621ed48921b7338b84b4f415cba6b"
  },
  "id": "0a800487f06d71eaf4cffdfde1ab28bc",
  "rev": "2-c839bbb8844549c2e298275c4b2adcb8",
  "resource": "67c621ed48921b7338b84b4f415cba6b",
  "links": {
    "self": {
      "href": "/authoring/v1/renditions/0a800487f06d71eaf4cffdfde1ab28bc"
    },
    "media": {
      "href": "/authoring/v1/resources/67c621ed48921b7338b84b4f415cba6b?resize=1.5xw:1.5xh&crop=200:200;50:100"
    },
    "asset": {
      "href": "/authoring/v1/assets/27c621ed48921b7338b84b4f415cba6b"
    },
    "resource": {
      "href": "/authoring/v1/resources/67c621ed48921b7338b84b4f415cba6b"
    }
  }
}