Image Item File endpoint

The Image Item File endpoint and fields are described below including details of the supported RESTful CRUD verbs. For details of the conventions of the API see the general conventions.

Endpoint path prefix:

/n/v1/imageitemfile

imageitemfile was introduced in API version V1

Image Item File has not been marked for deprecation

Description

Endpoint for associating an image file with a image item in an entity. Use this endpoint to upload a file which will be distributed to content delivery edge points

The image item file endpoint accepts form encoded file upload with required fields for the image item URN and the src file size format. See multipart form submission
The provided file name for the multipart form data will be used to construct the final file name including it's value where possible to support SEO friendly file names.
When the file is provided for the LARGE or MEDIUM format the file name will be suffixed -large. or -medium. respectively.

Verbs / methods

This endpoint supports the following CRUD operations in line with our API conventions. See the conventions section for more details.

CREATE HTTP POST

Request payload

Image Item File reference

Response payload

Image Item reference
Object representing an image resource

{
  "urn" : "b62ebbea-fdc1-4926-917a-ffb0848fd239",
  "url" : "/n/v1/imageitem/b62ebbea-fdc1-4926-917a-ffb0848fd239",
  "name" : "heading_background",
  "sortOrder" : 0,
  "altText" : "Description of the image",
  "src" : "https://example.com/url/will/be/set/when/asset/uploaded.jpg",
  "entity" : {
    "urn" : "4fdf15cf-cfa3-4b43-9e92-57dfbbc0366d",
    "url" : "/n/v1/entity/4fdf15cf-cfa3-4b43-9e92-57dfbbc0366d"
  }
}

Response codes / scenarios

  • CREATE_SUCCESS

    API code CREATE_SUCCESS HTTP status code 201 : When the representation provided was successfully created return HTTP created (201). Note that when other context like authorisation and permissions are satisfied but the representation is invalid or missing required information typically a error representation with details of the missing information may be returned instead with REPRESENTATION_MISSING_REQUIRED_FIELD api error for example

  • NOT_FOUND

    API code NOT_FOUND HTTP status code 404 : When the request referenced a representation or a concept that was not found including other request context requirements. Note that if a request is missing other concepts including authorisation, permissions or restrictions on the visibility HTTP not found (404) will typically be returned. Note that when creating a representation if the owner or other references can't be resolved the endpoint may return not found.

  • BAD_REQUEST

    API code BAD_REQUEST HTTP status code 400 : When the request is invalid or malformed the general bad request response can be returned.