Partially Update an Analysis

Partially update an existing Analysis.

Partially Update an Analysis

patch

Partially update an existing Analysis.

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/authentication

Path parameters
analysis_idstringRequired

An existing Beam Analysis ID.

Body
namestring · min: 1Optional
external_idstring · min: 1Optional

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

Example: {"external_id":"abc123"}
labelstring[] · min: 1Optional

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

Example: ["label1","label2","label3"]
Responses
patch
/v1/beam/analyses/{analysis_id}
PATCH /v1/beam/analyses/{analysis_id} HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 340

{
  "name": "text",
  "location": {
    "saved_location_id": "8gZ2rn8BRcTjM_3SWdjP"
  },
  "demand_type": {
    "demand_type": {
      "industry": "restaurants",
      "currency_code": "USD",
      "unit_currency_multiplier": 1,
      "unit_descriptor": "Sales"
    }
  },
  "external_id": {
    "external_id": "abc123"
  },
  "label": [
    "label1",
    "label2",
    "label3"
  ],
  "rank": {
    "rank": {
      "type": "phq",
      "levels": {
        "phq": {
          "min": 51
        }
      }
    }
  }
}

No content

Examples

curl -X PATCH "https://api.predicthq.com/v1/beam/analyses/$ANALYSIS_ID" \
     -H "Accept: application/json" \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     --data @<(cat <<EOF
    {
        "name": "Analysis 2",
    }
    EOF
    )  

OpenAPI Spec

The OpenAPI spec for Beam API can be found here.

Guides

Below are some guides relevant to this API:

Last updated

Was this helpful?