Update an Analysis Group
Update (replace) an existing Analysis Group.
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
An Analysis Group ID. Analyses that belong to this group will be returned.
3ED1zxXqAYName of an analysis group.
My Analysis Group 1The list of existing analysis IDs to include in the group.
Analyses can belong to multiple groups. Analyses must have the same demand type (the interval must match and, for weekly analyses, week_start_day must also be consistent). Every analysis in the group must have the same industry, if set.
["zRa_kk7MlAA","3aR-gbJp98I","JBb08XsZqAo","q9iX2XqFBxM"]Successful Response
Invalid analysis_ids
Bearer token scope insufficient
Analysis Group not found
A data conflict has occurred due to the analysis group being modified elsewhere. Please retry your call later.
Validation Error
No content
Examples
curl -X PUT "https://api.predicthq.com/v1/beam/analysis-groups/$GROUP_ID" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @<(cat <<EOF
{
"name": "Analysis Group 2",
"analysis_ids": [
"zRa_kk7MlAA",
"Wfjj1_PCArw"
]
}
EOF
)import requests
response = requests.put(
url="https://api.predicthq.com/v1/beam/analysis-groups/$GROUP_ID",
headers={
"Authorization": "Bearer $ACCESS_TOKEN",
"Accept": "application/json"
},
json={
"name": "Analysis Group 2",
"analysis_ids": [
"zRa_kk7MlAA",
"Wfjj1_PCArw",
],
}
)
print(response.status_code)OpenAPI Spec
Last updated
Was this helpful?