List the Custom Site Variables

 

List the Custom Site Variables

In order to list the Custom Site Variables configuration, you can query the following API endpoint:

http://apirest.atinternet-solutions.com/config/v1/bi/attributes?keys={siteid:999999}&filter={dimensiontechnicallabel:cr_x}
Please refer to this note if you’re using SSO to login to AT Internet services.

The API will return the following array:

[{
"AttributeID": 123456,
"TechnicalLabel": "cl_123456",
"Label": "Custom Variable 1 Label"
}, {
"AttributeID": 456789,
"TechnicalLabel": "cl_456789",
"Label": "Custom Variable 2 Label"
}]

The TechnicalLabel field provides you with the value you should use in the columns parameter of the getData method.

Please note that the API may also return extra attributes (such as “Detail”, “Metadata”, “Format”, etc.), that can be ignored.

 

Filter on specific dates

As it’s possible to delete and create custom variable, the API allows you to filter on the dates, should you need to show only the active custom variables on a given period:

http://apirest.atinternet-solutions.com/config/v1/bi/attributes?keys={siteid:999999}&filter={dimensiontechnicallabel:cr_x}&start=2018-01-01T00:00&end=2018-01-05T23:59
Please refer to this note if you’re using SSO to login to AT Internet services.

The dates should match the the ISO 8601 format.

Last update: 22/01/2019