# Get an Analysis Group

## Get an Analysis Group

> Get an existing Analysis Group.

```json
{"openapi":"3.1.0","info":{"title":"PredictHQ Beam API","version":"1.0.0"},"tags":[{"name":"Analysis Groups"}],"servers":[{"url":"https://api.predicthq.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"$API_KEY","description":"Enter your PredictHQ API key. The Bearer prefix is added automatically.\n\nWhen calling the API directly, send: `Authorization: Bearer <YOUR_API_KEY>` as documented at [https://docs.predicthq.com/api/overview/authenticating](https://docs.predicthq.com/api/overview/authenticating)\n"}},"schemas":{"AnalysisGroupResponse":{"type":"object","properties":{"group_id":{"type":"string","title":"Group Id"},"name":{"description":"Name of the Analysis Group.","type":"string","minLength":1,"title":"Name"},"analysis_ids":{"description":"Comma-separated list of strings containing the IDs of Analyses included in this Group.","type":"array","items":{"type":"string"},"explode":false,"style":"form","title":"Analysis Ids"},"user_id":{"description":"The ID of the user who created the Analysis Group. Present for groups created in the WebApp; not populated for\ngroups created via the API.","type":"string","title":"User Id"},"processing_completed":{"description":"The value of this field determines whether or not the aggregated Feature Importance is ready to be viewed for an\nAnalysis Group.\nIt also includes an optional list of Analyses which were excluded from processing for various reasons.","$ref":"#/components/schemas/AnalysisGroupProcessingCompleted"},"readiness_status":{"$ref":"#/components/schemas/AnalysisGroupReadinessStatus"},"demand_type":{"$ref":"#/components/schemas/DemandTypeResponse"},"status":{"$ref":"#/components/schemas/AnalysisGroupStatus"},"create_dt":{"description":"The creation date time for the Analysis Group in ISO 8601 format.","type":"string","format":"date-time","title":"Create Dt"},"update_dt":{"description":"The last update date time for the Analysis Group in ISO 8601 format.","type":"string","format":"date-time","title":"Update Dt"},"processed_dt":{"description":"Date and time when the Analysis processing completed (ISO 8601).","type":"string","format":"date-time","title":"Processed Dt"}},"required":["name"],"title":"AnalysisGroupResponse"},"AnalysisGroupProcessingCompleted":{"description":"Determines whether the aggregated Feature Importance is ready to be viewed for this Analysis Group\nand may include a list of excluded analyses with reasons.","type":"object","properties":{"feature_importance":{"description":"Indicates whether the aggregated Feature Importance is ready to be viewed for this Analysis Group.","type":"boolean","default":false,"title":"Feature Importance"},"value_quant":{"description":"Indicates whether the Value Quant is ready to be viewed for this Analysis Group.","type":"boolean","default":false,"title":"Value Quant"},"excluded_analyses":{"description":"A list of Analyses that were excluded from processing, with reasons.","type":"array","items":{"$ref":"#/components/schemas/ExcludedAnalysis"},"default":[],"title":"Excluded Analyses"}},"title":"AnalysisGroupProcessingCompleted"},"ExcludedAnalysis":{"type":"object","properties":{"analysis_id":{"type":"string","title":"Analysis Id"},"reason":{"$ref":"#/components/schemas/AnalysisExcludedReason"},"excluded_from":{"type":"array","items":{"$ref":"#/components/schemas/ExcludedFromReason"},"default":[],"title":"Excluded From"}},"required":["analysis_id","reason"],"title":"ExcludedAnalysis"},"AnalysisExcludedReason":{"type":"string","enum":["analysis_not_found","analysis_deleted","analysis_failed","analysis_not_ready","analysis_demand_type_inconsistent","analysis_feature_importance_incomplete","analysis_value_quant_incomplete"],"title":"AnalysisExcludedReason"},"ExcludedFromReason":{"type":"string","enum":["feature_importance","value_quant"],"title":"ExcludedFromReason"},"AnalysisGroupReadinessStatus":{"description":"Determines whether the Analysis Group has finished processing.\nWhen the group or its analyses are created, modified, or\nrefreshed, readiness_status will be pending until processing completes.","type":"string","enum":["pending","failed","ready"],"title":"AnalysisGroupReadinessStatus"},"DemandTypeResponse":{"description":"Indicates the detected type of the uploaded demand data as well as other user-defined information about\nthe demand data.","type":"object","properties":{"industry":{"$ref":"#/components/schemas/Industry"},"interval":{"description":"Demand interval for analyses in the group. Possible values: day, week.","default":"day","$ref":"#/components/schemas/Interval"},"week_start_day":{"description":"Week start day (e.g. sunday, monday). Only present for weekly Analysis Groups.","$ref":"#/components/schemas/Weekday"},"unit_descriptor":{"description":"The description of the unit of demand, which specifies the type or measure being quantified (e.g.,\n\"Occupancy Rate\", \"Sales\", \"Number of Transactions\").","type":"string","default":"Sales","title":"Unit Descriptor"},"currency_code":{"default":"USD","$ref":"#/components/schemas/CurrencyCode"},"unit_currency_multiplier":{"description":"The multiplier used to adjust the unit of demand to its equivalent value in the specified currency.","type":"number","default":1,"title":"Unit Currency Multiplier"}},"title":"DemandTypeResponse"},"Industry":{"description":"The industry of the demand data being analysed by Beam. Choosing the right industry is important as this will\ndetermine the type of features used in the Analysis and will impact the accuracy of the results.","type":"string","default":"other","enum":["accommodation","cpg","tourism","marketing","parking","restaurants","retail","transportation","other"],"title":"Industry"},"Interval":{"type":"string","enum":["day","week"],"title":"Interval"},"Weekday":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"title":"Weekday"},"CurrencyCode":{"description":"The ISO 4217 standard code representing the currency corresponding to the units of demand.","type":"string","default":"USD","enum":["USD","EUR","GBP","AUD","CAD"],"title":"CurrencyCode"},"AnalysisGroupStatus":{"description":"Status of the Analysis Group.","type":"string","enum":["active","deleted"],"title":"AnalysisGroupStatus"},"HTTPError":{"type":"object","properties":{"error":{"type":"string","title":"Error"}},"required":["error"],"title":"HTTPError"}}},"paths":{"/v1/beam/analysis-groups/{group_id}":{"get":{"operationId":"get_analysis_group_public_analysis_groups__group_id__get","summary":"Get an Analysis Group","description":"Get an existing Analysis Group.","parameters":[{"name":"group_id","in":"path","description":"An Analysis Group ID. Analyses that belong to this group will be returned.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisGroupResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}}},"403":{"description":"Bearer token scope insufficient"},"404":{"description":"Analysis Group not found"}},"tags":["Analysis Groups"]}}}}
```

## Examples

{% tabs %}
{% tab title="curl" %}

```bash
curl -X GET "https://api.predicthq.com/v1/beam/analysis-groups/$GROUP_ID" \
     -H "Accept: application/json" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
```

{% endtab %}

{% tab title="python" %}

```python
import requests

response = requests.get(
    url="https://api.predicthq.com/v1/beam/analysis-groups/$GROUP_ID",
    headers={
      "Authorization": "Bearer $ACCESS_TOKEN",
      "Accept": "application/json"
    }
)

print(response.json())
```

{% endtab %}
{% endtabs %}

## OpenAPI Spec

The OpenAPI spec for Beam API can be [found here](https://api.predicthq.com/docs/?urls.primaryName=Beam+API).
