Labels

The label management resource is /api/v1/drivers.

The format of a platform entity such as a label is defined as follows:

interface Label {
  _id        : String;  /* Identificator */
  name       : String;  /* Name */
  description: String;  /* Description */
}

Linking to the object

Linking labels to objects and unlinking control from them occurs by sending the  POST /api/v1/links/drivers/to/objects/, which has the following data format:

interface LinkRequest {
  item   : String;    /* Identificator of an item */
  link   : String[];  /* List of objects to link  */
  unlink : String[];  /* List of objects to unlink */
}

Request

POST /api/v1/links/drivers/to/objects/ HTTP/1.1
Content-Type: application/json
Authorization: Bearer {token}

{
  "item":"5821edee94f1b91e00d6143b",
  "link":["5821edee94f1b91e00d61431", "5821edee94f1b91e00d61432"],
  "unlink":["5821edee94f1b91e00d61433"]
}

Response

HTTP/1.1 200 OK

{
  "success": true
}

We use cookies to improve your experience. Let’s accept it and move on.