Skip to main content

Records by ID

The Records by ID API returns an array of records for the IDs provided. It is optimized for fast lookups by unique ID.

Use cases

You can use the Records by ID API to display the details of a record. For example, you can use the Records by ID API to display the details of a record in a data table or on a record detail page.

Record detail pages
Data table example

Features

  • Fast lookup by ID: Data Pools are optimized to provide fast record lookups by the unique ID. It is the fastest way to fetch a single record.

Usage

Arguments

The table below describes the input parameters for the Records by Unique ID API. These parameters allow you to specify a list of unique IDs for the records to be fetched.

FieldTypeRequiredDescription
dataPoolDataPoolInputYes

The Data Pool to be queried. A Data Pool ID or unique name can be provided.

columns array of StringYes

The columns to retrieve.

uniqueIds array of StringYes

The unique IDs of the records to retrieve.

Read more about RecordsByUniqueIdInput.

Response

The Records by ID API responds with a RecordsByUniqueIdResponse object that includes the records requested.

FieldTypeNullableDescription
columns array of StringNo

The Data Pool columns for the record.

values array of StringNo

An array of values for the record.

queryQueryInfoNo

The Query statistics and metadata.

Read more about RecordsByUniqueIdResponse.

Example

The following example demonstrates how to use the Records by ID API to fetch the record with ID “1234567890”.

query RecordsByUniqueId($input: RecordsByUniqueIdInput!) {
recordsByUniqueId(input: $input) {
columns
values
}
}

Variables:

{
"input": {
"dataPool": {
"name": "TacoSoft Demo Data"
},
"columns": ["taco_name", "salsa_name", "quantity"],
"uniqueIds": ["a8b6b27a-5aab-4cbd-abab-3d89eec5f790"]
}
}