Create an Analysis
Creating an Analysis is the first step in understand which types of events impact your demand.
Authorizations
AuthorizationstringRequired
Enter your PredictHQ API key. The Bearer prefix is added automatically.
When calling the API directly, send: Authorization: Bearer <YOUR_API_KEY> as documented at https://docs.predicthq.com/api/overview/authenticating
Body
namestring · min: 1RequiredExample:
Name of an analysis.
My Location Analysis 1external_idstring · min: 1OptionalExample:
External identifier associated with the Analysis (optional, user-defined).
{"external_id":"abc123"}labelstring[] · min: 1OptionalExample:
Comma-separated list of labels that can be used to search and filter analyses.
["label1","label2","label3"]Responses
201
Successful Response
application/json
422
Validation Error
application/json
post
/v1/beam/analysesExamples
curl -X POST "https://api.predicthq.com/v1/beam/analyses" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @<(cat <<EOF
{
"name": "Analysis 1",
"location": {
"geopoint": {
"lat": "-36.849761",
"lon": "174.7628903"
},
"radius": 1.2,
"unit": "km"
},
"demand_type": {
"industry": "restaurants"
},
"rank": {
"type": "phq"
}
}
EOF
)OpenAPI Spec
Guides
Last updated
Was this helpful?