iotoms Docs

Update a gallery image

PUT
/api/v1/catalog/attributes/image-gallery/{id}

Replaces the image URL of a gallery entry. The URL must not already be used by another entry. Items that reference the entry show the new image.

How to use it

  1. Take the entry id from List gallery images.
  2. Send the new imageUrl; it must be unique in the gallery.
  3. The entry keeps its id, so items linked to it now point at the new image.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

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 PUT 'https://beta.iotoms.com/api/v1/catalog/attributes/image-gallery/0' \  -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"}