---
title: "Get the common variables associated with the tenant."
method: GET
path: "/{spaceId}/tenants/{tenantId}/commonvariables"
tags: ["Tenants"]
---

# Get the common variables associated with the tenant.

`GET /{spaceId}/tenants/{tenantId}/commonvariables`

## Request

- Base URL: `https://demo.octopus.app/api`
- URL: `https://demo.octopus.app/api/{spaceId}/tenants/{tenantId}/commonvariables`
- Auth: one of:
  - API key in header `X-Octopus-ApiKey`
  - API key in query parameter `ApiKey`
  - API key in header `X-NuGet-ApiKey`

## Path parameters

- `spaceId` string, required
- `tenantId` string, required

## Query parameters

- `includeMissingVariables` boolean

## Response `200`

The common variables associated with a tenant.

- GetCommonVariablesByTenantIdResponse
  - `ConcurrencyToken` string, required
  - `MissingVariables` MissingTenantCommonVariable[]
    - `LibraryVariableSetId` string, required
    - `LibraryVariableSetName` string
    - `Scope` CommonVariableScope, required
      - `EnvironmentIds` string[], required
    - `Template` ActionTemplateParameterResource
      - `DefaultValue` PropertyValueResource
        - `IsSensitive` boolean
        - `SensitiveValue` SensitiveValue
          - `HasValue` boolean
          - `Hint` string
          - `NewValue` string
        - `Value` string
      - `DisplaySettings` object
      - `HelpText` string
      - `Id` string
      - `Label` string
      - `Name` string
    - `TemplateId` string, required
    - `Value` PropertyValueResource
      - `IsSensitive` boolean
      - `SensitiveValue` SensitiveValue
        - `HasValue` boolean
        - `Hint` string
        - `NewValue` string
      - `Value` string
  - `TenantId` string, required
  - `Variables` TenantCommonVariableV2[], required
    - `Id` string, required
    - `LibraryVariableSetId` string, required
    - `LibraryVariableSetName` string
    - `Scope` CommonVariableScope, required
      - `EnvironmentIds` string[], required
    - `Template` ActionTemplateParameterResource
      - `DefaultValue` PropertyValueResource
        - `IsSensitive` boolean
        - `SensitiveValue` SensitiveValue
          - `HasValue` boolean
          - `Hint` string
          - `NewValue` string
        - `Value` string
      - `DisplaySettings` object
      - `HelpText` string
      - `Id` string
      - `Label` string
      - `Name` string
    - `TemplateId` string, required
    - `Value` PropertyValueResource, required
      - `IsSensitive` boolean
      - `SensitiveValue` SensitiveValue
        - `HasValue` boolean
        - `Hint` string
        - `NewValue` string
      - `Value` string

## Other responses

- `400`: Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404`: Not found. One or more of the entities involved in the operation was not found.

---

[API](https://skmtc.dev/octopus/apis/octopus-server-api.md) - [All operations](https://skmtc.dev/octopus/apis/octopus-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/octopus/apis/octopus-server-api/revisions/fe937c07da34?raw)
