> For the complete documentation index, see [llms.txt](https://experience-digital-transform.gitbook.io/experience-digital-transformation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://experience-digital-transform.gitbook.io/experience-digital-transformation/national-learner-registry/deployment-and-system-integration/accessing-registry-data-via-api.md).

# Accessing Registry Data via API

## Description

This guide shows how to read register records from the Private (Registry Environment) through the cabinet API — for example, to check or export data from the National Learner Registry without using the UI.

Access takes two steps:

1. **Get a JWT token** — copied from the browser after signing in to the cabinet;
2. **Call the API** — send a request (Postman or cURL) with the token in the `token` header.

{% hint style="info" %}
The token acts with the permissions of the signed-in user, so the API returns only the data that user can see in the cabinet.
{% endhint %}

## Get a JWT Token

1. **Log in to the cabinet.** Open [cabinet.private.assembly.govstack.global](https://cabinet.private.assembly.govstack.global) and sign in with your login and password. Your user must have access to the environment.
2. **Open developer tools.** Press F12 (on macOS Cmd+Option+I) and go to the **Application** tab.
3. **Copy the token.** Open **Local storage → <https://cabinet.private.assembly.govstack.global>** and copy the value of the `token` key.

<figure><img src="https://1570236252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAihRrnZjzMP4xIiQjLDs%2Fuploads%2FPnp4lexZAXOfGhx93QQi%2FToken%20in%20Dev%20Tools.png?alt=media&amp;token=8e1e543f-7a50-4315-8ed0-544bf00c26e6" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Figure 1. The token in DevTools → Application → Local storage</em></p>

## Call the API in Postman

1. **Create a GET request** with the URL:

```
https://cabinet-api.private.assembly.govstack.global/registers/keys/131/records?offset=0&limit=100
```

2. **Add the header.** In the **Headers** tab, add:

| Key   | Value              |
| ----- | ------------------ |
| token | `<your JWT token>` |

3. **Click Send.** A successful response returns **200 OK** with the register records.

<figure><img src="https://1570236252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAihRrnZjzMP4xIiQjLDs%2Fuploads%2FPI3AiICDuE2PBDU5WxTW%2FSuccesful%20request%20in%20postman.png?alt=media&amp;token=93130f5c-45f2-4980-bc86-a9e547ec64bf" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Figure 2. Successful request in Postman</em></p>

## Request Parameters

| Parameter | What it means                                                                                                     |
| --------- | ----------------------------------------------------------------------------------------------------------------- |
| 131       | <p>Register key ID (path parameter)<br>131 — National Learner Registry<br>137 — National Certificate Registry</p> |
| limit     | Maximum number of records per request                                                                             |

## cURL Equivalent

The same request from the command line.

```bash
curl --location 'https://cabinet-api.private.assembly.govstack.global/registers/keys/131/records?offset=0&limit=100' \
--header 'accept: */*' \
--header 'accept-language: en-US,en;q=0.9,uk;q=0.8' \
--header 'cache-control: no-cache' \
--header 'origin: https://cabinet.private.assembly.govstack.global' \
--header 'pragma: no-cache' \
--header 'priority: u=1, i' \
--header 'referer: https://cabinet.private.assembly.govstack.global/' \
--header 'sec-ch-ua: "Google Chrome";v="149", "Chromium";v="149", "Not)A;Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Linux"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'token: <your JWT token>' \
   --header 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://experience-digital-transform.gitbook.io/experience-digital-transformation/national-learner-registry/deployment-and-system-integration/accessing-registry-data-via-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
