iotoms Docs

Add a gallery image

POST
/api/v1/catalog/attributes/image-gallery

Adds an image URL to the catalog image gallery so items can reference it by ID. The URL must be unique across the gallery.

How to use it

  1. Host the image and send its public URL as imageUrl; it must not already be in the gallery.
  2. Keep the returned id; items reference the image by it.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
id?|

Gallery entry identifier. Set by the server; items reference the image by this id.

Formatint64
imageUrl*string

Public URL of the image. Required and must be unique across the gallery.

modifiedTime*string

Date and time (ISO 8601) the entry was last saved. Defaults to the time of saving when omitted.

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Gallery entry identifier. Set by the server; items reference the image by this id.

Formatint64
imageUrl*string

Public URL of the image. Required and must be unique across the gallery.

modifiedTime*string

Date and time (ISO 8601) the entry was last saved. Defaults to the time of saving when omitted.

Formatdate-time
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/catalog/attributes/image-gallery' \  -H 'Content-Type: application/json' \  -d '{  "imageUrl": "string",  "modifiedTime": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": 0,  "imageUrl": "string",  "modifiedTime": "2019-08-24T14:15:22Z"}