Dimension Service API  2.0.0
api indexresource index

POST {+dimensionNode}/ancestor

since: 0.6
Sets or updates the ancestor of a specific node. The ancestor must belong to a different aspect than the one assigned to the specific node.

This is a privileged operation.

Path Elements

+dimensionNode
0.6required
string
The URI path to a specific dimension node (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 - update ancestor for a node referenced by ID to an ancestor referenced by ID

Request:

{
  "nodeID"   :"7516fd43-adaa-3e0b-8a65-a672c39845d2",
  "aspectID" :"6ddc09dc-4560-31d9-854e-9fe670374eb2"
}
      

Response:
HTTP/1.1  204  NO CONTENT

Example - update ancestor for a node referenced by name to an ancestor referenced by name

Request:

{
  "nodeName"   :"US-TX",
  "aspectName" :"STATE"
}
      

Response:
HTTP/1.1  204  NO CONTENT

Error Example - blank or missing aspect or ancestor node

see: DIM-001224

Request:

{
  "nodeName" :""
}
      

Response:
HTTP/1.1  400  BAD REQUEST

{
  "errorID"     : "DIM-001224",
  "errorMessage": "Sorry, could not update node's ancestry.",
  "requestID"   : "DIM-0800200c9a66",
  "details"     : [
    {
      "errorID"     : "DIM-001213",
      "errorMessage": "Sorry, when specifying an ancestor for dimension node 'US-TX-Houston', either the ancestor 'nodeID' or 'nodeName' field must be included in the request (both fields must not be missing or blank).",
      "nodeName"    : ""
    },
    {
      "errorID"     : "DIM-001212",
      "errorMessage": "Sorry, when specifying an ancestor for dimension node 'US-TX-Houston', either the ancestor 'aspectID' or 'aspectName' field must be included in the request (both fields must not be missing or blank)."
      "aspectID"    : ""
    }
  ]
}
        

Error Example - Ancestor node and/or aspect do not exist

see: DIM-001224

Request:

{
  "nodeName" : "US-MX",
  "aspectID" : "6ddc09dc-4560-31d9-854e-9fe674334eb2"
}
      

Response:
HTTP/1.1  400  BAD REQUEST

{
  "errorID"     : "DIM-001224",
  "errorMessage": "Sorry, could not update node's ancestry.",
  "requestID"   : "DIM-0800200c9a66",
  "details"     : [
    {
      "errorID"     : "DIM-001226",
      "errorMessage": "Sorry, dimension node 'US-TX-HOUSTON' could not be updated because it referred to unknown ancestor node: 'US-MX'.",
      "nodeName"    : "US-MX"
    }
  ]
}
        

Error Example - Ancestor node does not exist in aspect

see: DIM-001224

Request:

{
  "nodeName"   :"US-TX",
  "aspectName" :"COUNTRY"
}
      

Response:
HTTP/1.1  400  BAD REQUEST

{
  "errorID"     : "DIM-001224",
  "errorMessage": "Sorry, could not update node's ancestry.",
  "requestID"   : "DIM-0800200c9a66",
  "details"     : [
    {
      "errorID"     : "DIM-001208",
      "errorMessage": "Sorry, the ancestor node 'US-TX' does not belong to ancestor aspect 'COUNTRY'.",
      "nodeName"    : "US-TX"
    }
  ]
}
        

Error Example - Ancestor belongs to same aspect as the new node

see: DIM-001224

Request:

{
  "nodeName"   :"US-TX-Dallas",
  "aspectName" :"CITY"
}
      

Response:
HTTP/1.1  400  BAD REQUEST

{
  "errorID"     : "DIM-001224",
  "errorMessage": "Sorry, could not update node's ancestry.",
  "requestID"   : "DIM-0800200c9a66",
  "details"     : [
    {
      "errorID"     : "DIM-001209",
      "errorMessage": "Sorry, dimension node 'US-TX-Houston' cannot refer to an ancestor node 'US-TX-Dallas' within its own aspect 'CITY'.",
      "nodeName"    : "US-TX-Dallas"
    }
  ]
}
        

Error Example - Ancestor references root node

see: DIM-001224

Request:

{
  "nodeName"   :"ANY",
  "aspectName" :"WORLD"
}
      

Response:
HTTP/1.1  400  BAD REQUEST

{
  "errorID"     : "DIM-001224",
  "errorMessage": "Sorry, could not update node's ancestry.",
  "requestID"   : "DIM-0800200c9a66",
  "details"     :
  [
    {
      "errorID"     : "DIM-001210",
      "errorMessage": Sorry, cannot set ancestor relationships for the root aspect 'WORLD'.",
      "aspectName"  : "WORLD"
    }
  ]
}
        

Error Example - Missing request payload

Request:

      

Response:
HTTP/1.1  400  BAD REQUEST