---
title: "Return records for a data type"
method: GET
path: "/data/v1/records"
tags: ["data"]
---

# Return records for a data type

`GET /data/v1/records`

## Request

- Base URL: `https://api.fulcradynamics.com`
- URL: `https://api.fulcradynamics.com/data/v1/records`
- Auth: HTTP bearer

Return records for a data type

Takes a compact subset of PromQL and returns individual records for a data type.

The subset of PromQL supports:

- Instant and Range Vector Selectors
- `@` and `offset` modifiers
- `=` and `!=` label matchers on `id`, `tag`, and `source`
- Matcher grouping on `or`
- `last_over_time()` over a Range Vector, returning only the most recent
  matching record in the range

User-defined data types are queried with a `__name__` matcher, since PromQL
metric names can't contain `/`: `{__name__="Event/<uuid>"}[1d]`. Other
matchers combine with it as usual (`{__name__="Event/<uuid>", tag="..."}`);
with `or`, repeat the `__name__` matcher in every group.

Instant Vectors deviate from typical Prometheus behavior. An un-anchored Instant Vector will return the latest record with an infinite lookback window. Anchored Instant Vectors return any records that match or fall within a duration.

Returned record schema for individual data types is available from the catalog API: `data/v1/catalog/{data_type}/v1/schema`

## Query parameters

- `fulcra_userid` string, uuid, nullable: User ID of the Fulcra User to query records for
- `format` 'json' | 'csv'
- `q` string, required: PromQL query

## Response `200`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fulcradynamics/apis/fulcra-life-api.md) · [All operations](https://skmtc.dev/fulcradynamics/apis/fulcra-life-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fulcradynamics/apis/fulcra-life-api/revisions/d85136fc304a?raw)
