Dimension Service API  2.0.0
api indexresource index

POST {+nodeAttribute}/labels

since: 0.7
Updates the list of human-readable descriptive text strings associated with a specific attribute.

This is a privileged operation. (Note: Concurrent requests to update a label or group of labels may result in data being overwritten.)

Path Elements

+nodeAttribute
0.6required
string
The URI path to a specific node attribute (whether by ID or by name).

Request Headers

pros-dimension-consistency
0.13optional
string
pros-dimension-consistency is an optional HTTP header used to define the data consistency level of the request. There is a trade off between data consistency and service availability and performance: higher data consistency can result in lower availability and slower performance, while lower data consistency can result in higher availability and faster performance.
0.13 valid values:
  • HIGHEST
  • HIGH
  • NORMAL
  • LOW
  • LOWEST

Resource Information

Request Content
application/json
Request Object
Response Content
json
Success Statuses
204  NO CONTENT
Error Statuses
400  BAD REQUEST

Example - rename attribute referenced by ID

Request:

[
  {
      "locale" :"en-GB",
      "value"  :"Rather Large Townships"
  }
]
        

Response:
HTTP/1.1  204  NO CONTENT

Example - update labels for a node referenced by name

Request:

[
  {
      "locale" :"en-US",
      "value"  :"Latitude"
  },
  {
      "locale" :"es",
      "value"  :"latitud"
  },
  {
      "locale" :"es-ES",
      "value"  :"Latitud"
  }
]
      

Response:
HTTP/1.1  204  NO CONTENT

Error Example - blank or missing new labels

see: DIM-001224

Request:

Response:
HTTP/1.1  400  BAD REQUEST

{
  "errorID"     : "DIM-001224",
  "errorMessage": "Sorry, could not save the labels because there were errors.",
  "requestID"   : "DIM-0800200c9a66",
  "details"     :
  [
      {
      "errorID"     : "DIM-001501",
      "errorMessage": "Sorry, label values must not be missing or blank.",
      "locale"       : "en"
      },
      {
      "errorID"     : "DIM-001501",
      "errorMessage": "Sorry, label values must not be missing or blank.",
      "locale"       : "en-US"
      },
  ]
}
        

Error Example - missing request payload

Request:

Response:
HTTP/1.1  400  BAD REQUEST