Find a guide, feature, or API endpoint. Try “FTP”, “alerts”, or “instruments”.

Browse documentation

Docs/API reference / Calculated variables

Read calculated variables

Requires `developer_api.calculated_variables.read` on the project-scoped Developer API connection. Use the API origin supplied for your deployment. Unknown query parameters and unexpected request bodies are rejected.

GET/dev-api/v1/p/{project_id}/instruments/{instrument_id}/calculated-variables/{variable_id}All endpoints ↗

The request panel saves credentials and API settings in this browser. Privacy details

GET
/dev-api/v1/p/{project_id}/instruments/{instrument_id}/calculated-variables/{variable_id}

Authorization

developerApiKey
AuthorizationBearer <token>

Project-scoped Developer API connection key. Grant only the required operation permissions.

In: header

Path Parameters

project_id*string
Match.*\S.*
Length1 <= length <= 128
instrument_id*string
Match.*\S.*
Length1 <= length <= 128
variable_id*string
Match.*\S.*
Length1 <= length <= 128

Query Parameters

include_archived?boolean

Include archived resources explicitly. Archived history still requires authorization.

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

bash
curl -X GET "https://example.com/dev-api/v1/p/string/instruments/string/calculated-variables/string"
json
{
  "request_id": "string",
  "data": {
    "lifecycle_state": "active",
    "archived_at": "2019-08-24T14:15:22Z",
    "archived_by": {
      "type": "user",
      "id": "string"
    },
    "id": "string",
    "instrument_id": "string",
    "name": "string",
    "alias": "string",
    "variable_type": "ingested",
    "unit": "cm",
    "expected_cadence_s": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "is_time_variable": true,
    "configuration_generation": 0,
    "calculations": [
      {
        "id": "stringstringstringstr",
        "start_time": "2019-08-24T14:15:22Z",
        "expression": "string",
        "editor_tokens": [
          {
            "kind": "text",
            "text": "string"
          }
        ],
        "inputs": [
          {
            "id": "stringstringstringstr",
            "kind": "self_variable",
            "variable_id": "string",
            "constant_id": null,
            "source_instrument_id": null,
            "past_buffer_seconds": null
          }
        ]
      }
    ],
    "value_type": "string",
    "view_options": {
      "hide": true,
      "graph": {
        "scale": {
          "min": 0,
          "max": 0,
          "interval": 1,
          "custom": false
        }
      }
    }
  }
}