Hierarchical Value Service API  future
api indexresource index

POST link

since: 0.6
Create a link to a table.

Request Headers

pros-hvs-consistency
0.13optional
string
pros-hvs-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-rtpe-cache
0.35optional
string

pros-rtpe-cache is an optional HTTP header used to define the caching strategy used by Hierarchial Value Service for a request. This header helps control which internal caches should be used by the service when processing the request. There is a tradeoff between returning the most recent data and performance. Disabling caches will help ensure that the most recent data available are returned, but will likely increase the time required to process and respond to the request.

When disable.metadata is specified, caches related to table and dimension metadata will be disabled.

When disable.data is specified, caches related to table and dimension data will be disabled.

When disable.all is specified, all caches will be disabled.

When any cache is disabled, those caches will not be updated with values retrieved during a request.

0.35 valid values:
  • enable
  • disable.metadata
  • disable.data
  • disable.all

Resource Information

Request Content
json
Request Object
Response Content
json
Success Statuses
201  CREATED
Error Statuses
400  BAD REQUEST
404  NOT FOUND
409  CONFLICT

Example - Create A Link To link To A Table

Request:

      
        {
          "name"    : "Price Guidance",
          "tableID" : "bb18498a-3228-425a-816c-481bac1030ca"
        }
      
    

Response:
HTTP/1.1  201  CREATED

        
          {
            "id"     : "aa12345a-3228-425a-816c-481bac1030ca",
            "name"   : "Price Guidance",
            "tableID": "bb18498a-3228-425a-816c-481bac1030ca"
          }
        
      

Error Example - Create Link With A Name That Exceeds 128 Characters

see: HVS-004030

Request:

      
        {
          "name"    : "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_exceeds_128_chars",
          "tableID" : "ff18498a-3228-425a-816c-481bac1030ca"
        }
      
    

Response:
HTTP/1.1  400  BAD REQUEST

        
          {
            "errorID"     : "HVS-004030",
            "errorMessage": "The length of the link name exceeds 128 characters.",
            "resourceType": "link",
            "requestID"   : "d0af9f1b-3159-4212-940e-ce984c19e8d4"
          }
        
      

Error Example - Create Link With Blank Name Or Without A Name

see: HVS-004031

Request:

      
        {
          "name"    : "",
          "tableID" : "ff18498a-3228-425a-816c-481bac1030ca"
        }
      
    

Response:
HTTP/1.1  400  BAD REQUEST

        
          {
            "errorID"     : "HVS-004031",
            "errorMessage": "Link name is not specified.",
            "resourceType": "link",
            "requestID"   : "d0af9f1b-3159-4212-940e-ce984c19e8d4"
          }
        
      

Error Example - Create Link To Link To A Table That Does Not Exist

see: HVS-004032

Request:

      
        {
          "name"    : "Phantom Link",
          "tableID" : "ff18498a-3228-425a-816c-481bac1030ca"
        }
      
    

Response:
HTTP/1.1  404  NOT FOUND

        
          {
            "errorID"     : "HVS-004032",
            "errorMessage": "The table this link is linked to does not exist.  Table ID: ff18498a-3228-425a-816c-481bac1030ca",
            "resourceType": "link",
            "requestID"   : "d0af9f1b-3159-4212-940e-ce984c19e8d4"
          }
        
      

Error Example - Create A Link Without Specifying Target Table ID

see: HVS-004033

Request:

      
        {
          "name"    : "A Link"
        }
      
    

Response:
HTTP/1.1  400  BAD REQUEST

        
          {
            "errorID"     : "HVS-004033",
            "errorMessage": "The ID of the table this link is linked to is missing.",
            "resourceType": "link",
            "requestID"   : "d0af9f1b-3159-4212-940e-ce984c19e8d4"
          }
        
      

Error Example - Create Link Without Payload

see: HVS-004036

Request:

Response:
HTTP/1.1  400  BAD REQUEST

        
          {
            "errorID"     : "HVS-004036",
            "errorMessage": "Cannot create a link without a valid payload.",
            "resourceType": "link",
            "requestID"   : "d0af9f1b-3159-4212-940e-ce984c19e8d4"
          }
        
      

Error Example - Create Link With A Name Used By Another Table Or Link

see: HVS-004038

Request:

      
        {
          "name"    : "aNameInUse",
          "tableID" : "ff18498a-3228-425a-816c-481bac1030ca"
        }
      
    

Response:
HTTP/1.1  409  CONFLICT

        
          {
            "errorID"     : "HVS-004038",
            "errorMessage": "Link name conflict with name aNameInUse.",
            "resourceType": "link",
            "requestID"   : "d0af9f1b-3159-4212-940e-ce984c19e8d4"
          }
        
      

Error Example - Create A Link To Link To Another Link

see: HVS-004040

Request:

      
        {
          "name"    : "linkToLink",
          "tableID" : "ff18498a-3228-425a-816c-481bac1030ca"
        }
      
    

Response:
HTTP/1.1  400  BAD REQUEST

        
          {
            "errorID"     : "HVS-004040",
            "errorMessage": "A link cannot link to another link.",
            "resourceType": "link",
            "requestID"   : "d0af9f1b-3159-4212-940e-ce984c19e8d4"
          }