---
title: "Get a repository variable"
method: GET
path: "/repos/{owner}/{repo}/actions/variables/{name}"
tags: ["actions"]
---

# Get a repository variable

`GET /repos/{owner}/{repo}/actions/variables/{name}`

Gets a specific variable in a repository.

You must authenticate using an access token with the `repo` scope to use this endpoint.
GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint.
Authenticated users must have collaborator access to a repository to create, update, or read variables.

## Path parameters

- `owner` string, required
- `repo` string, required
- `name` string, required

## Response `200`

Response

- ActionsVariable
  - `name` string, required — The name of the variable.
  - `value` string, required — The value of the variable.
  - `created_at` string, date-time, required — The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
  - `updated_at` string, date-time, required — The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.

---

[API](https://skmtc.dev/github/apis/enterprise-server.md) · [All operations](https://skmtc.dev/github/apis/enterprise-server/llms.txt) · [OpenAPI document](https://skmtc.dev/github/apis/enterprise-server/revisions/4ad3e94264bd?raw)
