Datapoint API
This API is used to obtain all of the questions and answers for a datapoint.
For each datapoint you want to map, you should invoke the datapoint command to see the possible answers.
Command
"livealert/datapoint/1"
Recommended Frequency
Once every 12 hours to check for changes to datapoints.
Inputs
The following values are expected in the JSON body:
Name | Type | Required | Description |
---|---|---|---|
command | String | Must be "livealert/datapoint/1" |
|
name | String | The datapoint name. |
Outputs
Name | Type | Description |
---|---|---|
name | String | The datapoint name. |
property | String | The property name. |
mode | Integer |
|
type | Integer | Type of question 0 - Radio Button (Single Selection) |
question | JSON | An object containing the text for the question in multiple locales. e.g.
When a locale is not present, please use the "en-US" value. |
answers | JSON[] | An array of answer objects.
The index of the answer is the numeric code for that answer. ie. "4 to 6" is answer #3. Note that the 0th answer is typically null, so the first answer starts with 1. The disposition values for each answer are: The disposition values for each answer are:
|
countries | String[] | The array contains the ISO codes of the countries that are supported by this datapoint. |
Example Command
{
"command": "livealert/datapoint/1",
"name": "RFG2_Vote"}
Example Response
"response": {
"answers": [
null,
{
"en-US": "Yes",
"disposition": 0
},
{
"en-US": "No",
"disposition": 0
}
],
"mode": 1,
"name": "RFG2_Vote",
"property": "rfg2_634",
"question": {
"en-US": "Are you registered to vote?"
},
"type": 0,
"countries" : [ "US" , "VN" ]
}