Dimension Service API  2.0.0
api indexresource index

POST {+dimension}/nodes/id

since: 0.17
Given a list of node IDs within a single dimension, returns an expanded list of dimension node objects which include details of each node's label, name, parent aspects, and the values of specifically-requested attributes (if any). Nodes appear in the result in the same order as originally specified in the request. If a requested node does not exist, it is represented by a null value in the result list.

Path Elements

+dimension
0.17required
string
The URI path to a specific dimension (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
pros-dimension-include
0.17optional
string

pros-dimension-include is an optional HTTP header used for clients to indicate whether data values that are omitted by default should be returned by APIs of the PROS Dimension Service. Its value consists of one or more values as listed below. When multiple values are specified, the ASCII comma charater must be used as a separator. There is a trade-off between data completeness and service performance. Higher data completeness may result in lower availability and/or lower performance.

When node.ancestor.id is specified, a result set of a request that returns dimension nodes contains members exposing their ancestor node IDs as well as other properties.

When node.ancestor.name is specified, a result set of a request that returns dimension nodes contains members exposing their ancestor node names as well as other properties.

When node.aspect.name is specified, a result set of a request that returns dimension nodes contains members exposing their aspect names alongside their aspect IDs.

When node.label.allLocales is specified, a result set of a request that returns dimension nodes contains members exposing the whole list of labels corresponding to all available locales as well as other properties.

0.17 valid values:
  • node.ancestor.id
  • node.ancestor.name
  • node.aspect.name
  • node.label.allLocales

Request Body

id
0.17required
string
One or more dimension node IDs that are expanded.
0.17 min length: 1
0.17 max length: 100
attrID
0.21optional
string
IDs of the dimension attributes whose values are requested. If any given attribute IDs are not defined in this dimension, error will be reported in the response along with BAD_REQUEST http status. This parameter can be repeated but each value should refer to a different attribute of the dimension.
attrName
0.21optional
string
Names of the dimension attributes whose values are requested. If any given attribute names are not defined in this dimension, error will be reported in the response along with BAD_REQUEST http status. This parameter can be repeated but each value should refer to a different attribute of the dimension.

Extended description

This method provides a batch operation to retrieve details of multiple dimension nodes in the context of a particular dimension, given that their node IDs are known. Instead of multiple calls of GET {+dimension}/nodes/id/{id} on each dimension node ID, a single call to this method with the dimension node IDs passed in as parameters retrieves the same result more efficiently. The optional attrID and attrName can be provided at the same time. However, they should represent different attributes of the dimension. Request an unknown attribute to the dimension results in BAD_REQUEST. If a node does not have a value for the requested attribute, the attribute will be absent from that node in the response. Use pros-dimension-include header with node.ancestor.id value to request ancestor ID and ancestor aspect ID pairs of the nodes. Ancestor ID and ancestor aspect ID pairs are not included in the response by default.

The response header pros-batch-errors indicates the number of elements with errors in the response body. This header is only returned when the status code is 200 and errors are present in the response, otherwise the header is omitted.

Resource Information

Request Content
form
Response Content
json
Response Object
array of DimensionNode
Success Statuses
200  OK
Error Statuses
400  BAD REQUEST

Example - retrieve details of a list of nodes referenced by IDs in context of a dimension name, including ancestors

Request:

id=d60abd09-f492-3902-8f35-5448709f18cc&id=4be24f04-a3b7-37dc-9573-ae1da864d3df&attrID=8eff7d99-4f05-3e95-a6e5-d0adb6f62f37&attrName=POPULATION&attrName=LAT

Response:
HTTP/1.1  200  OK

[
  {
      "ancestors": [
          {
              "aspectID": "2b848a8c-c886-3253-921a-77c43cd50aae",
              "nodeID": "ca34305e-e38a-3e14-acad-3bb8ab97d2af"
          },
          {
              "aspectID": "6ddc09dc-4560-31d9-854e-9fe670374eb2",
              "nodeID": "7516fd43-adaa-3e0b-8a65-a672c39845d2"
          }
      ],
      "aspect": {
          "aspectID": "85921462-8431-3951-97c0-558f7b5f8ffc"
      },
      "attributes": [
          {
              "type": "integer",
              "attrID": "29be0fe0-8815-37d0-81b5-7f4781e3848e",
              "attrName": "POPULATION",
              "integer": "582049",
              "text": "582.049",
              "type": "integer"
          }
      ],
      "id": "d60abd09-f492-3902-8f35-5448709f18cc",
      "label": {
          "locale": "en",
          "value": "Washington"
      },
      "name": "US-DC-Washington"
  },
  {
      "ancestors": [
          {
              "aspectID": "6ddc09dc-4560-31d9-854e-9fe670374eb2",
              "nodeID": "7516fd43-adaa-3e0b-8a65-a672c39845d2"
          }
      ],
      "aspect": {
          "aspectID": "2b848a8c-c886-3253-921a-77c43cd50aae"
      },
      "id": "4be24f04-a3b7-37dc-9573-ae1da864d3df",
      "label": {
          "locale": "en",
          "value": "Washington"
      },
      "name": "US-WA"
  }
]
   

Example - retrieve details of a list of nodes referenced by IDs in context of a dimension ID

Request:

id=d60abd09-f492-3902-8f35-5448709f18cc&id=4be24f04-a3b7-37dc-9573-ae1da864d3df

Response:
HTTP/1.1  200  OK

[
  {
      "aspect": {
          "aspectID": "85921462-8431-3951-97c0-558f7b5f8ffc"
      },
      "id": "d60abd09-f492-3902-8f35-5448709f18cc",
      "label": {
          "locale": "en",
          "value": "Washington"
      },
      "name": "US-DC-Washington"
  },
  {
      "aspect": {
          "aspectID": "2b848a8c-c886-3253-921a-77c43cd50aae"
      },
      "id": "4be24f04-a3b7-37dc-9573-ae1da864d3df",
      "label": {
          "locale": "en",
          "value": "Washington"
      },
      "name": "US-WA"
  }
]
   

Example - one or more nodes do not exist

Request:

id=4be24f04-a3b7-37dc-9573-ae1da864d3df&id=09724d38-dead-beef-b316-b57501a02772

Response:
HTTP/1.1  200  OK

[
  {
      "aspect": {
          "aspectID": "2b848a8c-c886-3253-921a-77c43cd50aae"
      },
      "id": "4be24f04-a3b7-37dc-9573-ae1da864d3df",
      "label": {
          "locale": "en",
          "value": "Washington"
      },
      "name": "US-WA"
  },
  null
]
   

Example - at least one node ID is not a valid UUID

Request:

id=4be24f04-a3b7-37dc-9573-ae1da864d3df&id=09724d38-baad-uuid-b316-b57501a02772

Response:
HTTP/1.1  200  OK

[
  {
      "aspect": {
          "aspectID": "2b848a8c-c886-3253-921a-77c43cd50aae"
      },
      "id": "4be24f04-a3b7-37dc-9573-ae1da864d3df",
      "label": {
          "locale": "en",
          "value": "Washington"
      },
      "name": "US-WA"
  },
  null
]
   

Error Example - Requested attribute is not defined in the dimension

see: DIM-001223

Request:

id=4be24f04-a3b7-37dc-9573-ae1da864d3df&id=09724d38-baad-uuid-b316-b57501a02772&attrID=c689acc7-ee13-3482-aa7b-c6a13419421d&attrName=LON

Response:
HTTP/1.1  400  BAD REQUEST

{
  "errorID"     : "DIM-001223",
  "errorMessage": "Sorry, cannot retrieve a node with values for unknown attributes.
                   Please review the defined attributes and try again.",
  "requestID"   : "DIM-ab3332f82d70846a",
  "details"     : [
    {
      "errorID"     : "DIM-001401",
      "errorMessage": "Sorry, the requested attribute 'c689acc7-ee13-3482-aa7b-c6a13419421d' does not exist.",
      "fieldID"     : "attrID",
      "value"       : "c689acc7-ee13-3482-aa7b-c6a13419421d"
    },
    {
      "errorID"     : "DIM-001401",
      "errorMessage": "Sorry, the requested attribute 'LON' does not exist.",
      "fieldID"     : "attrName",
      "value"       : "LON"
    }
  ]
}