---
title: "Gets a list of Variants filtered by Ids or Short Names"
method: GET
path: "/api/v1/dimensions/variants/{param}"
tags: ["Dimensions"]
---

# Gets a list of Variants filtered by Ids or Short Names

`GET /api/v1/dimensions/variants/{param}`

## Request

- Base URL: `https://population.un.org/dataportalapi`
- URL: `https://population.un.org/dataportalapi/api/v1/dimensions/variants/{param}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/united-nations/apis/data-portal-api/docs/api/v1/dimensions/variants/:param/get.ts> (a function with typed inputs; its response is checked against the schema)

<br>Gets all Variants if no 'ids' parameter is supplied.
<br>Otherwise, it filters Variants based on 'ids' parameter.
<br>Multiple 'ids' parameters can be passed in, separated by semi-column (i.e. '1;2;3').

## Path parameters

- `param` string, required

## Query parameters

- `sort` string

## Response `200`

Returns Status 200 OK

- VariantDto[]
  - `id` integer
  - `name` string, nullable
  - `label` string, nullable
  - `shortName` string, nullable
  - `uncertainty` integer, nullable
  - `predictionIntervalLabel` string, nullable
  - `uncertaintyZIndex` integer, nullable
  - `sortOrder` integer
  - `description` string, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Returns Status 404 NotFound if 'VariantId' does not exist
- `406`: Not Acceptable
- `500`: Returns Status 500 Internal Server Error if an exception is thrown from the Web API code.

---

[API](https://skmtc.dev/united-nations/apis/data-portal-api.md) - [All operations](https://skmtc.dev/united-nations/apis/data-portal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/united-nations/apis/data-portal-api/revisions/2f5f5b77ad0d?raw)
