---
title: "Return observations for a custom selection of variables"
method: GET
path: "/population-types/{population-type}/census-observations"
tags: ["Public"]
---

# Return observations for a custom selection of variables

`GET /population-types/{population-type}/census-observations`

## Request

- Base URL: `/v1` (relative, and the document’s source URL is not known)
- URL: `/v1/population-types/{population-type}/census-observations`
- Auth: none declared

## Path parameters

- `population-type` string, required

## Query parameters

- `dimensions` string
- `area-type` string

## Response `200`

Json object containing all metadata for a version

- GetDatasetObservationsResponse: An object containing information on a list of observations for a given version of a census dataset - updated response
  - `observations` GetDatasetObservation[]: A list of dimensions for the given query
    - `dimensions` ObservationDimension[]: A list of dimensions for the given query
      - `dimension` string: The dimension description
      - `dimension_id` string: The dimension id
      - `option` string: The description of the option the observation relates to
      - `option_id` string: The id of the option the observation relates to
    - `observation` integer: The observation relating to the combination of dimensions and options
  - `links` object: A list of links related to this observation resource
    - `dataset_metadata` Link
      - `href` string: link to resource
      - `id` string: id of resource
    - `self` Link
      - `href` string: link to resource
      - `id` string: id of resource
    - `version` Link
      - `href` string: link to resource
      - `id` string: id of resource
  - `total_observations` integer: The number of observations found
  - `blocked_area_count` integer: The number of areas blocked by this query

## Other responses

- `400`: Invalid request, reasons can be one of the following: * query parameters contain incorrect dimensions
- `404`: Resource not found, reasons can be one of the following: * dataset id was incorrect * edition was incorrect * version was incorrect * observations not found for selected query paramaters
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/population-types-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/population-types-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/population-types-api/revisions/f50432209eff?raw)
