---
title: "Get Schema"
method: GET
path: "/v1/schema"
deprecated: true
---

# Get Schema

`GET /v1/schema`

## Request

- The document declares no server URL.
- Auth: none declared

> **Deprecated.**

Gets the guid with specific survey id and version and uses that to retrieve a schema.
Latest version schema will be retrieved if version is omitted

Parameters:
survey_id (str): survey id of the schema metadata.
version (str) (optional): version of the survey.
schema_firebase_repository (SchemaFirebaseRepository): injected dependency for
    interacting with the schema collection in firestore.
schema_processor_service (SchemaProcessorService): injected dependency for
    interacting with the schema collection in firestore.

## Query parameters

- `survey_id` string, nullable
- `version` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error

## Changes

> 32 revisions in range; 2 not diffed.

- **2026-07-01** `9a87e51baf13`: 2 info
  - api operation id `get_schema_v1_schema_get` removed and replaced with `Get_Schema_v1_schema_get`
  - endpoint deprecated
- **2026-05-06** `5f194f40cc20`: 1 info
  - api operation id `get_schema_from_bucket_v1_schema_get` removed and replaced with `get_schema_v1_schema_get`
- **2024-09-17** `d3f01a32165f`: 4 info
  - `query` request parameter `survey_id` list-of-types was widened by adding types `null`
  - `query` request parameter `version` list-of-types was widened by adding types `null`
  - for the `query` request parameter `survey_id`, the type was generalized from `string` to no type
  - for the `query` request parameter `version`, the type was generalized from `string` to no type
- **2023-08-25** `ac59298eeeb5`: 6 info
  - api operation id `get_schema_from_bucket_v1_schema_get` was added
  - the `query` request parameter `survey_id` became optional
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `400`
  - …2 more
- **2023-05-15** `345ae0601c4f`: 1 info
  - the `query` request parameter `version` became optional

[Operation history](https://skmtc.dev/office-of-national-statistics/apis/supplementary-data-service/changes/v1/schema/get.md)

---

[API](https://skmtc.dev/office-of-national-statistics/apis/supplementary-data-service.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/supplementary-data-service/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/supplementary-data-service/revisions/9a87e51baf13?raw)
