Add a single record to the specified table for existing tenants only.
Please note that all the single record updates and deletes are no longer supported for the newly provisioned tenants.
Use the Batch Scope APIs i.e SCOPE UPSERT and
SCOPE DELETE) for the upsert operations.
Path Elements
+table
string
|
The URI path to a specific table (whether
by ID or
by name).
|
Example
- Create Data Using Table ID
Request:
{
"start": "2014-04-14T10:05:43",
"end": "2014-05-18T20:14:21",
"key": [
{
"nodeName" : "0011491975135",
"dimName" : "SAMPLE_PRODUCTS"
},
{
"dimName" : "LARGE_CITIES",
"nodeName" : "US-TX"
}
],
"values" : [
{
"name" : "Forecasted Volume",
"value" : "17.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "15.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "7.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "High"
}
]
}
Response:
HTTP/1.1
201
CREATED
{
"tableID" : "bb18498a-3228-425a-816c-481bac1030ca",
"start": "2014-04-14T10:05:43",
"end": "2014-05-18T20:14:21",
"key": [
{
"dimID" : "28484058-4ffc-329b-94ff-63e1ddbd7189",
"dimName" : "SAMPLE_PRODUCTS",
"nodeID" : "27de4ae8-61be-3fff-a397-16362cafeba2",
"nodeName" : "0011491975135"
},
{
"dimID" : "c689acc7-ee13-3482-aa7b-c6a13419431c",
"dimName" : "LARGE_CITIES",
"nodeID" : "7baaa4ab-dd43-31a2-9454-ebc60fb910d5",
"nodeName" : "US-TX"
}
],
"values" : [
{
"name" : "Forecasted Volume",
"value" : "17.26172",
"type" : "DECIMAL",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "15.27181",
"type" : "DECIMAL",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "7.97181",
"type" : "DECIMAL",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "High",
"type" : "STRING"
}
]
}
Example
- Create Dynamic Data
Request:
{
"start": "2014-04-01T10:13:05",
"end": "2014-12-31T11:15:18",
"key": [
{
"dimName" : "Location",
"nodeName" : "US-TX"
}
],
"values" : [
{
"name" : "Price",
"type" : "DECIMAL",
"value": "10",
"unit" : "each",
"currency" : "USD",
"perQuantity" : 1
},
{
"name" : "Description",
"type" : "STRING",
"value": "Base price."
}
]
}
Response:
HTTP/1.1
201
CREATED
{
"tableID" : "cb18498a-3228-425a-816c-481bac1030ca",
"start": "2014-04-01T10:13:05",
"end": "2014-12-31T11:15:18",
"key": [
{
"dimID" : "a689acc7-ee13-3482-aa7b-c6a13419431c",
"dimName" : "Location",
"nodeID" : "8baaa4ab-dd43-31a2-9454-ebc60fb910d5",
"nodeName" : "US-TX"
}
],
"values" : [
{
"name" : "Price",
"type" : "DECIMAL",
"value": "10",
"unit" : "each",
"currency" : "USD",
"perQuantity" : 1
},
{
"name" : "Description",
"type" : "STRING",
"value": "Base price."
}
]
}
Error
Example
- Create Dynamic Data Without Column Data Type Causing Error
Request:
{
"start": "2014-04-01T10:13:05",
"end": "2014-12-31T11:15:18",
"key": [
{
"dimName" : "Location",
"nodeName" : "US-TX"
}
],
"values" : [
{
"name" : "Description",
"value": "Base price."
}
]
}
Response:
HTTP/1.1
400
BAD REQUEST
{
"requestID" : "db18498a-456-123a-816c-481bac1030ce",
"errorID" : "HVS-004029",
"errorMessage": "The column type must be specified.",
"resourceType": "record"
}
Error
Example
- Create Dynamic Data With Unknown Column Data Type Causing Error
Request:
{
"start": "2014-04-01T10:13:05",
"end": "2014-12-31T11:15:18",
"key": [
{
"dimName" : "Location",
"nodeName" : "US-TX"
}
],
"values" : [
{
"name" : "Description",
"type" : "Not-Supported",
"value": "Base price."
}
]
}
Response:
HTTP/1.1
400
BAD REQUEST
{
"requestID" : "db18498a-456-123a-816c-481bac1030ce",
"errorID" : "HVS-004004",
"errorMessage": "Invalid type Not-Supported for the record column.",
"resourceType": "record"
}
Error
Example
- Error response when creating data in the new schema
Request:
{
"start": "2014-04-14T10:05:43",
"end": "2014-05-18T20:14:21",
"key": [
{
"nodeName" : "0011491975135",
"dimName" : "SAMPLE_PRODUCTS"
},
{
"dimName" : "LARGE_CITIES",
"nodeName" : "US-TX"
}
],
"values" : [
{
"name" : "Forecasted Volume",
"value" : "17.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "15.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "7.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "High"
}
]
}
Response:
HTTP/1.1
400
BAD REQUEST
{
"errorID": "HVS-004046",
"errorMessage": "Single record updates have been disabled for this tenant. Please use Batch Scope APIs.",
"resourceType": "record",
"requestID": "HVS-5ba77a6d6efb37b8"
}