---
title: "List variable groups"
method: GET
path: "/variable_groups/{id}"
tags: ["Microdata"]
---

# List variable groups

`GET /variable_groups/{id}`

Return the editor-native variable group tree for a microdata/survey project. Membership is `editor_variables.uid` integers. Hierarchy is nested `variable_groups` objects, not DDI IDREF strings. This is the shape the editor UI GET/POSTs. Project JSON export (`/editor/json/{id}`) uses interchange rows instead (space-separated VIDs/VGIDs).

## Path parameters

- `id` integer, required

## Response `200`

Nested variable group tree

- object
  - `variable_groups` VariableGroupStored[]
    - `vgid` string, required
    - `group_type` 'subject' | 'section' | 'multiResp' | 'grid' | 'display' | 'repetition' | 'version' | 'iteration' | 'analysis' | 'pragmatic' | 'record' | 'file' | 'randomized' | 'other'
    - `label` string
    - `txt` string
    - `universe` string
    - `notes` string
    - `definition` string
    - `variables` integer[] — Variable UIDs (not DDI VIDs)
    - `concepts` VariableGroupConcept[]
      - `concept` string
      - `vocab` string
      - `uri` string, uri
    - `variable_groups` VariableGroupStored[] — Nested child groups

## Other responses

- `400` — Bad request

## Changes

- **2026-08-13** `e176bc3938ca` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/worldbank/apis/metadata-editor-api/changes/variable_groups/:id/get.md)

---

[API](https://skmtc.dev/worldbank/apis/metadata-editor-api.md) · [All operations](https://skmtc.dev/worldbank/apis/metadata-editor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/worldbank/apis/metadata-editor-api/revisions/629dd4bfe928?raw)
