---
title: "Get Nexset Samples"
method: GET
path: "/data_sets/{set_id}/samples"
tags: ["Nexsets (Data Sets)"]
---

# Get Nexset Samples

`GET /data_sets/{set_id}/samples`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/data_sets/{set_id}/samples`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/data_sets/:set_id/samples/get.ts> (a function with typed inputs; its response is checked against the schema)

Use this endpoint to fetch some sample records from this Nexset. Use the relevant query parameters to control whether the samples returned are from the live Nexset topic or the Nexset sample cache.

## Path parameters

- `set_id` integer, required

## Query parameters

- `count` integer
- `include_metadata` boolean
- `include_metadata` boolean
- `live` boolean

## Headers

- `Accept` 'application/vnd.nexla.api.v1+json' | 'application/json': Setting to `application/vnd.nexla.api.v1+json` is recommended.

## Response `200`

Success

- union
  - object[]: Output samples without metadata
  - object[]
    - `rawMessage` object: Contents of the record in this sample.
    - `nexlaMetaData` object: Metadata about this record.
      - `sourceType` string
      - `ingestTime` integer
      - `sourceOffset` integer
      - `sourceKey` string
      - `topic` string, nullable
      - `resourceType` string
      - `resourceId` integer
      - `trackerId` object
      - `eof` boolean
      - `lastModified` integer
      - `runId` integer
      - `tags` object
      - `flow_type` string

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
