---
title: "Gets VariantMetadata for a given IndicatorId"
method: GET
path: "/api/v1/metadata/variants/{indicatorIds}"
tags: ["Metadata"]
---

# Gets VariantMetadata for a given IndicatorId

`GET /api/v1/metadata/variants/{indicatorIds}`

## Request

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

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

## Path parameters

- `indicatorIds` string, required

## Response `200`

Returns 200 OK if no errors

- VariantMetadataDto[]
  - `variantId` integer
  - `variantName` string, nullable
  - `variantDescription` string, nullable
  - `variantSortOrder` integer
  - `indicatorId` integer
  - `indicatorName` string, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Returns Status 404 NotFound if 'IndicatorId' does not exist
- `406`: Not Acceptable
- `500`: Server Error

---

[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)
