Applications - Consensus
Consensus History
The Application Consensus History returns subject-media consensus counts over time for the output subjects of the application.
Argument | Example | Description |
---|---|---|
start unix timestamp | 1234567890 | (optional) Earliest timestamp of subject-media consensus records to return. |
end unix timestamp | 1234567890 | (optional) Latest timestamp of subject-media consensus records to return. |
limit integer | 10 | (optional) Max number of records (per subject) to return. |
user_id string | [email protected] | (optional) Returns consensus counts for subject-media correctly asserted by the given user. |
GET /1/applications/{app_id}/consensusHistory
Host: https://api.cogniac.io
Example: Retrieve Application Subject Consensus History
curl -X GET https://api.cogniac.io/1/applications/di71rG94/consensusHistory?limit=10 \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz" \
import requests
my_headers = {"Authorization":"Bearer abcdefg.hijklmnop.qrstuvwxyz"}
resp = requests.get("https://api.cogniac.io/1/applications/di71rG94/consensusHistory?limit=10",
headers=my_headers)
print resp
{
"data": [
{
"subjects": {
"cat": {
"True": 91
},
"dog": {
"False": 40
}
},
"timestamp": 1490986560
},
{
"subjects": {
"cat": {
"True": 82
},
"dog": {
"False": 20
}
},
"timestamp": 1490986620
},
...
]
}
Updated over 6 years ago