iotoms Docs

Update a style

PUT
/api/v1/catalog/attributes/styles/{id}

Updates an existing style. The response is the bare object, without the standard {status, message, data} envelope.

How to use it

  1. Get the style ID from List styles.
  2. Send the full style with the new name; it must be unique and not blank.
  3. Items that use this style show the new name.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

Request Body

application/json
  1. body
id?|

Numeric style ID; use it as styleId on items.

Formatint64
name*string

Style name, unique across the catalog.

modifiedTime*string

When the style was last changed (ISO 8601 timestamp).

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Numeric style ID; use it as styleId on items.

Formatint64
name*string

Style name, unique across the catalog.

modifiedTime*string

When the style was last changed (ISO 8601 timestamp).

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