---
title: "Retrieve the Site Variables for a site"
method: GET
path: "/api/v1/site/variable/{siteId}"
tags: ["Site"]
---

# Retrieve the Site Variables for a site

`GET /api/v1/site/variable/{siteId}`

Returns all site variables associated with the specified site, including variable names, keys, values, and last modifier information. The 'siteId' parameter is the site identifier (also known as 'hostId' or 'host' in other parts of the API).

## Path parameters

- `siteId` string, required

## Response `200`

Site variables retrieved successfully

- ResponseSiteVariablesEntityView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` SiteVariableView[]
    - `id` string
    - `hostId` string
    - `name` string
    - `key` string
    - `value` string
    - `lastModifierId` string
    - `lastModDate` string, date-time
    - `lastModifierFullName` string
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `401` — Unauthorized access
- `403` — User does not have permission to access site variables
- `404` — When the site id does not exist

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
