Specifications for Attribute APIs¶
APIs of the Attributes
type provide information of attributes that are not defined on the EnOS model. Before registering the Attributes
APIs as the data sources in Common Data Service, you need to standardize the APIs according to the following specifications.
HTTP Method¶
POST
Request Parameters¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
orgId |
Mandatory |
String |
The organization ID which the attribute belongs to. |
dimensionId |
Mandatory |
String |
The identifier of the dimension corresponding to the attribute. |
keys |
Mandatory |
String |
The key of the dimension corresponding to the attribute. |
fields |
Optional |
String |
Filed mapping of the attribute. Separate multiple fields by commas. |
Response Parameters¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
data |
Definitely |
AttributeData Struct |
Describe the attribute data. See AttributeData Struct. |
AttributeData Struct ¶
Name |
To Return Definitely/Conditionally |
Data Type |
Description |
---|---|---|---|
key |
Definitely |
String |
The key of the dimension corresponding to the attribute. |
field |
Definitely |
String |
Filed mapping of the attribute. |
value |
Definitely |
Integer/Double/String |
Value of the attribute. |
Request Content Type¶
application/x-www-form-urlencoded
Response Content Type¶
application/json; charset = UTF-8
Request Sample¶
POST {requestURL}?orgId=yourOrgId
Content-Type: application/x-www-form-urlencoded
Payload: dimensionId=yourDimensionId&keys=yourKey1,yourKey2&fields=yourField1,yourField2
Response Sample¶
{
"data": {
"key1": {
"field1": "10",
"field2": 0
},
"key2": {
"field1": "10",
"field2": 0
}
},
"code": 0,
"msg": "OK"
}