post https://personafinai.azurewebsites.net/v2/consensus/search/timeseries
The search timeseries API will return a timeseries representing the number of searches performed per aggregation_bucket
, across the entire user base.
Prerequisites
Before obtaining meaningful data from this API ensure that
- You have you API
apikey
. Contact us to find out how to get access.- To personalise responses it is vital to capture an end user identifier as part of behaviour capture. Without such user ids, the api will be able to surface searches across your whole user-base, but will not be able to return personalised, relevant, searches.
Example Call
Querying the search timeseries API is as simple as making a call to the endpoint and including your apikey
and a valid end user id.
Details of the request and response objects are given in Request/Response
{
"apikey": <your api key>,
"time_interval": "Daily",
"aggregation_bucket": "Hour"
}
curl -X 'POST' \
'https://personafinai.azurewebsites.net/v2/personalized/search/top' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"apikey": <your api key>,
"time_interval": "Daily",
"aggregation_bucket": "Hour"
}'
The API will return a timeseries list of data points, containing a timestamp and count per bucket.
Request/Response
Request Object
The API request expects the following endpoint url and body parameters
POST https://personafinai.azurewebsites.net/v2/consensus/search/timeseries
Field | Description |
---|---|
apikey string | Authentication key to use to retrieve data |
timeinterval _string | The time interval to consider when retrieving results. Permitted values include - "Hourly": Return the results found over the last hour - "TwelveHours": Return results found over the last 12 hours - "Daily": Return the results found over the last 24 hours - "Weekly": Return the results found over the last week - "ThirtyDays": Return the results found over the last 30 days |
aggregationbucket _string | The volume of searches found over the permitted time_interval will be returned in a time series bucketed by the aggregation_bucket ; counts of searches per minute, hour, etc.Permitted values are: "Minute", "Hour", "Day", "Week", "FourWeeks", "NinetyDays", "Year" |
Response Object
The API will respond with an object containing the following
Field | Description |
---|---|
updated datetime | Datetime that the dataset returned was last computed for the given user |
dataPoints object | List of timeseries data points returned |
dataPoints.unixtimestamp int | Unix timestamp of the start of the data point bucket, in milliseconds |
dataPoints.datetimetimestamp string | Datetime string of the start of the data data point bucket |
dataPoints.count int | The volume of interactions found against the specific item |