For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create an Analysis

Creating an Analysis is the first step in understand which types of events impact your demand.

Create an Analysis

post

Creating an Analysis is the first step in understanding 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: 1 · max: 256Required

Name of an analysis.

Example: My Location Analysis 1
external_idstring · min: 1 · max: 256Optional

External identifier associated with the Analysis (optional, user-defined).

Example: abc123
labelstring[] · min: 1 · max: 100Optional

Comma-separated list of labels that can be used to search and filter analyses.

Example: ["label1","label2","label3"]
Responses
201

Successful Response

application/json
analysis_idstringOptional

The autogenerated identifier for the analysis.

post/v1/beam/analyses
POST /v1/beam/analyses HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 317

{
  "name": "My Location Analysis 1",
  "location": {
    "saved_location_id": "8gZ2rn8BRcTjM_3SWdjP"
  },
  "demand_type": {
    "industry": "restaurants",
    "currency_code": "USD",
    "unit_currency_multiplier": 1,
    "unit_descriptor": "Sales"
  },
  "external_id": "abc123",
  "label": [
    "label1",
    "label2",
    "label3"
  ],
  "rank": {
    "type": "phq",
    "levels": {
      "phq": {
        "min": 51
      }
    }
  }
}
{
  "analysis_id": "2iJcUzm3-ZE"
}

Examples

The following examples create an Analysis:

OpenAPI spec

Guides

These guides are relevant to this API:

Last updated

Was this helpful?