Sign in Start for free

Tenants

Get a list of tenants

GET /api/{spaceId}/tenants

Also reachable at /api/spaces/{spaceIdentifier}/tenants, /api/tenants.

Lists all of the tenants in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name, and returned 30 at a time.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • clonedFromTenantId string
    A Tenant ID, to limit the included Tenants to those cloned from that Tenant. Example: Tenants-1.
  • ids array of string
    A list of Tenant IDs, to limit the matching of Tenants to those with a particular ID. Example: [“Tenants-1”, “Tenants-2”].
  • isDisabled boolean
    Disabled Status, to limit the set of retrieved Tenants to those with the specified disabled status.
  • name string
    (Obsolete) A partial or complete name to limit the set of retrieved Tenants to. This will perform a “contains” style match against the supplied name or name-fragment. Left for backwards compatibility.
  • partialName string
    A partial name, to limit the set of Tenants to those with a name that includes the partial name.
  • projectId string
    A Project ID, to limit the set of Tenants to those connected to a particular Project. Example: Projects-1.
  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • tags array of string
    A set of Tenant Tags, to limit the set of retrieved Tenants to those which are tagged with the specific tags. Example: Alpha,Beta,Stable.
  • take integer
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — Requested list of Tenants

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • ClonedFromTenantId string
    • CustomFields array of string
    • Description string
    • Icon object
    • Id string
      Gets or sets a unique identifier for this resource.
    • IsDisabled boolean
    • LastModifiedBy string
      Gets or sets the username of the user who last modified this resource.
    • LastModifiedOn string
      Gets or sets the date/time that this resource was last modified. Format date-time.
    • Links object
      Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
    • Name string
    • ProjectEnvironments object
    • Slug string
    • SpaceId string
    • TenantTags array of string
      Tags are referenced by CanonicalName like {TagSetName}/{TagName}.
  • ItemsPerPage integer
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LastPageNumber integer
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "Id": "string",
  "ItemType": "string",
  "Items": [
    {
      "ClonedFromTenantId": "string",
      "CustomFields": [
        "string"
      ],
      "Description": "string",
      "Icon": {
        "Color": "string",
        "Id": "string"
      },
      "Id": "string",
      "IsDisabled": true,
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string",
      "ProjectEnvironments": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      },
      "Slug": "string",
      "SpaceId": "Spaces-1",
      "TenantTags": [
        "string"
      ]
    }
  ],
  "ItemsPerPage": 0,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LastPageNumber": 0,
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "NumberOfPages": 0,
  "TotalResults": 0
}

Create a new Tenant

POST /api/{spaceId}/tenants

Also reachable at /api/spaces/{spaceIdentifier}/tenants, /api/tenants.

Creates a new Tenant, optionally cloning an existing tenant if the clone query string parameter is provided.

Path Parameters

  • spaceId string (required)

Request Body

  • Clone string
    The ID of the Tenant to clone. Example: Tenants-101.
  • Description string
  • IsDisabled boolean
  • Name string (required)
    Minimum length 1.
  • ProjectEnvironments object
    The projects the tenant is connected to, as an object keyed by project ID where each value is the array of environment IDs the tenant can deploy to for that project. Example: {“Projects-1”: [“Environments-1”, “Environments-2”]}.
  • Slug string
    A URL-friendly, unique identifier for the tenant. Generated from the name when omitted, which is usually what you want.
  • SpaceId string (required)
  • TenantTags array of string
    Tags to apply to the tenant, as canonical tag names in the form ‘TagSetName/TagName’. Example: [“Regions/EU-West”, “Tier/Premium”]. Only tags from tenant-scoped tag sets are valid.

Response

201 — Created

  • ClonedFromTenantId string
  • CustomFields array of string
  • Description string
  • Icon object
    • Color string
      Icon background colour, as a Hex string.
    • Id string
      Font Awesome Icon Id.
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDisabled boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • Name string
  • ProjectEnvironments object
  • Slug string
  • SpaceId string
  • TenantTags array of string
    Tags are referenced by CanonicalName like {TagSetName}/{TagName}.

Example Request

JSON
{
  "Clone": "Tenants-1",
  "Description": "string",
  "IsDisabled": true,
  "Name": "string",
  "ProjectEnvironments": {
    "additionalProp1": [
      "string"
    ],
    "additionalProp2": [
      "string"
    ],
    "additionalProp3": [
      "string"
    ]
  },
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "TenantTags": [
    "string"
  ]
}

Example Response

JSON
{
  "ClonedFromTenantId": "string",
  "CustomFields": [
    "string"
  ],
  "Description": "string",
  "Icon": {
    "Color": "string",
    "Id": "string"
  },
  "Id": "string",
  "IsDisabled": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "ProjectEnvironments": {
    "additionalProp1": [
      "string"
    ],
    "additionalProp2": [
      "string"
    ],
    "additionalProp3": [
      "string"
    ]
  },
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "TenantTags": [
    "string"
  ]
}

List all tenants

GET /api/{spaceId}/tenants/all

Also reachable at /api/spaces/{spaceIdentifier}/tenants/all, /api/tenants/all.

Lists all of the tenants in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • ids array of string
    A set of Tenant IDs to retrieve Tenants for.
  • isDisabled boolean
    Disabled Status, to limit the set of retrieved Tenants to those with the specified disabled status.
  • name string
    (Obsolete) A partial or complete name to limit the set of retrieved Tenants to. This will perform a “contains” style match against the supplied name or name-fragment. Left for backwards compatibility.
  • partialName string
    A partial or complete name to limit the set of retrieved Tenants to. This will perform a “contains” style match against the supplied name or name-fragment.
  • projectId string
    A Project ID, to limit the set of retrieved Tenants to those connected to a particular Project.
  • tags array of string
    A set of Tenant Tags, to limit the set of retrieved Tenants to those which are tagged with the specific tags. Example: Alpha,Beta,Stable.

Response

200 — Requested list of Tenants

  • ClonedFromTenantId string
  • CustomFields array of string
  • Description string
  • Icon object
    • Color string
      Icon background colour, as a Hex string.
    • Id string
      Font Awesome Icon Id.
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDisabled boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • Name string
  • ProjectEnvironments object
  • Slug string
  • SpaceId string
  • TenantTags array of string
    Tags are referenced by CanonicalName like {TagSetName}/{TagName}.

Example Response

JSON
[
  {
    "ClonedFromTenantId": "string",
    "CustomFields": [
      "string"
    ],
    "Description": "string",
    "Icon": {
      "Color": "string",
      "Id": "string"
    },
    "Id": "string",
    "IsDisabled": true,
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Name": "string",
    "ProjectEnvironments": {
      "additionalProp1": [
        "string"
      ],
      "additionalProp2": [
        "string"
      ],
      "additionalProp3": [
        "string"
      ]
    },
    "Slug": "string",
    "SpaceId": "Spaces-1",
    "TenantTags": [
      "string"
    ]
  }
]

Report back the status of multi-tenancy

GET /api/{spaceId}/tenants/status

Also reachable at /api/spaces/{spaceIdentifier}/tenants/status, /api/tenants/status.

If multi-tenancy is enabled, "Enabled" will be true, otherwise it will be false.

Path Parameters

  • spaceId string (required)

Response

200 — The status of multi-tenancy.

  • Enabled boolean
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.

Example Response

JSON
{
  "Enabled": true,
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}

Check tenants for matching tags

GET /api/{spaceId}/tenants/tag-test

Also reachable at /api/spaces/{spaceIdentifier}/tenants/tag-test, /api/tenants/tag-test.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • tags array of string
    A list of Tenant Tags to limit the matching to.
  • tenantIds array of string
    A list of Tenant IDs to limit the matching to.

Response

200 — Requested set of Tenants with matching Tags

Example Response

JSON
{
  "additionalProp1": {
    "IsDisabled": true,
    "IsMatched": true,
    "MissingTags": [
      "string"
    ],
    "Reason": "string"
  },
  "additionalProp2": {
    "IsDisabled": true,
    "IsMatched": true,
    "MissingTags": [
      "string"
    ],
    "Reason": "string"
  },
  "additionalProp3": {
    "IsDisabled": true,
    "IsMatched": true,
    "MissingTags": [
      "string"
    ],
    "Reason": "string"
  }
}

Return a list of tenants who are missing required variables

GET /api/{spaceId}/tenants/variables-missing

Also reachable at /api/spaces/{spaceIdentifier}/tenants/variables-missing, /api/tenants/variables-missing.

Path Parameters

  • spaceId string (required)

Query Parameters

  • environmentId string
    An Environment ID, to limit the set of inspected Tenants to those connected to a particular Environment. Example: Environments-202.
  • includeDetails boolean
    A switch to indicate whether missing variable details should be returned along with names. When false, each result names only the tenant, which is enough to check whether a tenant is missing anything at all.
  • projectId string
    A Project ID, to limit the set of inspected Tenants to those connected to a particular Project. Example: Projects-202.
  • tenantId string
    An ID for a Tenant. If supplied, will limit the result to variables missing for the Tenant identified by the ID. Example: Tenants-101.

Response

200 — List of tenants who are missing required variables.

  • Links object
  • MissingVariables array of object
    • EnvironmentId string
    • LibraryVariableSetId string
    • Links object
    • ProjectId string
    • VariableTemplateId string
    • VariableTemplateName string
  • TenantId string

Example Response

JSON
[
  {
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "MissingVariables": [
      {
        "EnvironmentId": "Environments-1",
        "LibraryVariableSetId": "string",
        "Links": {},
        "ProjectId": "string",
        "VariableTemplateId": "string",
        "VariableTemplateName": "string"
      }
    ],
    "TenantId": "Tenants-1"
  }
]

Get a tenant by it’s Id

GET /api/{spaceId}/tenants/{id}

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{id}, /api/tenants/{id}.

Path Parameters

  • id string (required)
    ID of the Tenant to load.
  • spaceId string (required)

Response

200 — Returns a tenant

  • ClonedFromTenantId string
  • CustomFields array of string
  • Description string
  • Icon object
    • Color string
      Icon background colour, as a Hex string.
    • Id string
      Font Awesome Icon Id.
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDisabled boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • Name string
  • ProjectEnvironments object
  • Slug string
  • SpaceId string
  • TenantTags array of string
    Tags are referenced by CanonicalName like {TagSetName}/{TagName}.

Example Response

JSON
{
  "ClonedFromTenantId": "string",
  "CustomFields": [
    "string"
  ],
  "Description": "string",
  "Icon": {
    "Color": "string",
    "Id": "string"
  },
  "Id": "string",
  "IsDisabled": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "ProjectEnvironments": {
    "additionalProp1": [
      "string"
    ],
    "additionalProp2": [
      "string"
    ],
    "additionalProp3": [
      "string"
    ]
  },
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "TenantTags": [
    "string"
  ]
}

Modify an existing Tenant

PUT /api/{spaceId}/tenants/{id}

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{id}, /api/tenants/{id}.

Path Parameters

  • id string (required)
    ID of the Tenant to modify.
  • spaceId string (required)

Request Body

  • Description string
  • Id string (required)
    ID of the Tenant to modify.
  • IsDisabled boolean
  • Name string (required)
    Minimum length 1.
  • ProjectEnvironments object
    The complete set of projects the tenant is connected to, as an object keyed by project ID where each value is the array of environment IDs the tenant can deploy to for that project. Example: {“Projects-1”: [“Environments-1”]}. Replaces the tenant’s current connections; omitting an existing project disconnects it and deletes the tenant’s variable values for it.
  • Slug string
    A URL-friendly, unique identifier for the tenant. Resubmit the tenant’s current slug unless you intend to change it; changing it breaks existing links that use the old slug.
  • SpaceId string (required)
  • TenantTags array of string
    The complete set of tags for the tenant, as canonical tag names in the form ‘TagSetName/TagName’. Example: [“Regions/EU-West”, “Tier/Premium”]. Replaces the tenant’s current tags; any existing tag omitted here is removed.

Response

200 — Confirms that a Tenant has been modified, containing the updated Tenant

  • ClonedFromTenantId string
  • CustomFields array of string
  • Description string
  • Icon object
    • Color string
      Icon background colour, as a Hex string.
    • Id string
      Font Awesome Icon Id.
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDisabled boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • Name string
  • ProjectEnvironments object
  • Slug string
  • SpaceId string
  • TenantTags array of string
    Tags are referenced by CanonicalName like {TagSetName}/{TagName}.

Example Request

JSON
{
  "Description": "string",
  "Id": "Tenants-1",
  "IsDisabled": true,
  "Name": "string",
  "ProjectEnvironments": {
    "additionalProp1": [
      "string"
    ],
    "additionalProp2": [
      "string"
    ],
    "additionalProp3": [
      "string"
    ]
  },
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "TenantTags": [
    "string"
  ]
}

Example Response

JSON
{
  "ClonedFromTenantId": "string",
  "CustomFields": [
    "string"
  ],
  "Description": "string",
  "Icon": {
    "Color": "string",
    "Id": "string"
  },
  "Id": "string",
  "IsDisabled": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "ProjectEnvironments": {
    "additionalProp1": [
      "string"
    ],
    "additionalProp2": [
      "string"
    ],
    "additionalProp3": [
      "string"
    ]
  },
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "TenantTags": [
    "string"
  ]
}

Delete an existing Tenant

DELETE /api/{spaceId}/tenants/{id}

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{id}, /api/tenants/{id}.

Path Parameters

  • id string (required)
    ID of the Tenant to delete.
  • spaceId string (required)

Response

200 — Success

Get the logo associated with the Tenant

GET /api/{spaceId}/tenants/{id}/logo

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{id}/logo, /api/tenants/{id}/logo.

Path Parameters

  • id string (required)
    ID of the Tenant to retrieve the logo for.
  • spaceId string (required)

Response

200 — Success

Example Response

JSON
"string"

Modify the logo associated with the tenant

POST /api/{spaceId}/tenants/{id}/logo

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{id}/logo, /api/tenants/{id}/logo.

Path Parameters

  • id string (required)
    ID of the Tenant to update the logo for.
  • spaceId string (required)

Response

200 — Success

Modify the logo associated with the tenant

PUT /api/{spaceId}/tenants/{id}/logo

Path Parameters

  • id string (required)
    ID of the Tenant to update the logo for.
  • spaceId string (required)

Response

200 — Success

Modify the logo associated with the tenant

PUT /api/spaces/{spaceIdentifier}/tenants/{id}/logo

Also reachable at /api/tenants/{id}/logo.

Path Parameters

  • id string (required)
    ID of the Tenant to update the logo for.
  • spaceIdentifier string (required)
    Identifier (ID or slug) of the space.

Response

200 — Success

Get variables associated with the provided tenant ID

GET /api/{spaceId}/tenants/{id}/variables

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{id}/variables, /api/tenants/{id}/variables.

Path Parameters

  • id string (required)
    Id of the Tenant to retrieve variables for.
  • spaceId string (required)

Response

200 — Variables associated with the provided tenant ID.

  • ConcurrencyToken string
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LibraryVariables object
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ProjectVariables object
  • SpaceId string
  • TenantId string
  • TenantName string

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LibraryVariables": {
    "additionalProp1": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectVariables": {
    "additionalProp1": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "TenantName": "string"
}

Create or Update the variables associated with the tenant

POST /api/{spaceId}/tenants/{id}/variables

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{id}/variables, /api/tenants/{id}/variables.

Path Parameters

  • id string (required)
    ID of the Tenant to modify.
  • spaceId string (required)

Request Body

  • ConcurrencyToken string
  • Id string (required)
    ID of the Tenant to modify.
  • LibraryVariables object
  • ProjectVariables object
  • SpaceId string (required)
  • TenantName string

Response

200 — The variables associated with the tenant.

  • ConcurrencyToken string
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LibraryVariables object
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ProjectVariables object
  • SpaceId string
  • TenantId string
  • TenantName string

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "Id": "Tenants-1",
  "LibraryVariables": {
    "additionalProp1": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "ProjectVariables": {
    "additionalProp1": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "SpaceId": "Spaces-1",
  "TenantName": "string"
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LibraryVariables": {
    "additionalProp1": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectVariables": {
    "additionalProp1": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "TenantName": "string"
}

Create or Update the variables associated with the tenant

PUT /api/{spaceId}/tenants/{id}/variables

Path Parameters

  • id string (required)
    ID of the Tenant to modify.
  • spaceId string (required)

Request Body

  • ConcurrencyToken string
  • Id string (required)
    ID of the Tenant to modify.
  • LibraryVariables object
  • ProjectVariables object
  • SpaceId string (required)
  • TenantName string

Response

200 — The variables associated with the tenant.

  • ConcurrencyToken string
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LibraryVariables object
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ProjectVariables object
  • SpaceId string
  • TenantId string
  • TenantName string

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "Id": "Tenants-1",
  "LibraryVariables": {
    "additionalProp1": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "ProjectVariables": {
    "additionalProp1": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "SpaceId": "Spaces-1",
  "TenantName": "string"
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LibraryVariables": {
    "additionalProp1": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectVariables": {
    "additionalProp1": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "TenantName": "string"
}

Create or Update the variables associated with the tenant

PUT /api/spaces/{spaceIdentifier}/tenants/{id}/variables

Also reachable at /api/tenants/{id}/variables.

Path Parameters

  • id string (required)
    ID of the Tenant to modify.
  • spaceIdentifier string (required)
    Identifier (ID or slug) of the space.

Request Body

  • ConcurrencyToken string
  • Id string (required)
    ID of the Tenant to modify.
  • LibraryVariables object
  • ProjectVariables object
  • SpaceId string (required)
  • TenantName string

Response

200 — The variables associated with the tenant.

  • ConcurrencyToken string
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LibraryVariables object
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ProjectVariables object
  • SpaceId string
  • TenantId string
  • TenantName string

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "Id": "Tenants-1",
  "LibraryVariables": {
    "additionalProp1": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "ProjectVariables": {
    "additionalProp1": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "SpaceId": "Spaces-1",
  "TenantName": "string"
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LibraryVariables": {
    "additionalProp1": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "LibraryVariableSetId": "string",
      "LibraryVariableSetName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectVariables": {
    "additionalProp1": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp2": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    },
    "additionalProp3": {
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectId": "string",
      "ProjectName": "string",
      "Templates": [
        {}
      ],
      "Variables": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
    }
  },
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "TenantName": "string"
}

Get the common variables associated with the tenant

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

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{tenantId}/commonvariables, /api/tenants/{tenantId}/commonvariables.

Path Parameters

  • spaceId string (required)
  • tenantId string (required)
    The ID of the tenant to read common variable values for. Example: Tenants-101.

Query Parameters

  • includeMissingVariables boolean
    When true, the response also lists the library variable set templates the tenant is required to supply a value for but has not, along with each template’s default value.

Response

200 — The common variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • MissingVariables array of object
    • LibraryVariableSetId string
    • LibraryVariableSetName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • LibraryVariableSetId string
    • LibraryVariableSetName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "MissingVariables": [
    {
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ],
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Create or Update the common variables associated with the tenant

POST /api/{spaceId}/tenants/{tenantId}/commonvariables

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{tenantId}/commonvariables, /api/tenants/{tenantId}/commonvariables.

Path Parameters

  • spaceId string (required)
  • tenantId string (required)

Request Body

  • ConcurrencyToken string
    The concurrency token returned when reading the tenant’s variables. Always pass it back so the write is rejected if someone else changed the variables since your read; omitting it skips the check and risks silently overwriting their changes.
  • SpaceId string (required)
  • TenantId string (required)
  • Variables array of object (required)
    The complete set of common variable values for the tenant; existing values omitted here are deleted. Each item is an object: ‘Id’ (the existing value’s ID when updating; omit when adding), ‘OwnerId’ (the library variable set ID), ‘TemplateId’ (the variable template ID), ‘Value’ (a plain string for non-sensitive values, or {“HasValue”: true, “NewValue”: “secret”} for sensitive ones), and ‘Scope’ ({“EnvironmentIds”: […]} limiting the value to those environments; empty applies to all).
    • Id string
    • OwnerId string (required)
      Minimum length 1.
    • Scope object (required)
    • TemplateId string (required)
      Minimum length 1.
    • Value object (required)

Response

200 — The common variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • LibraryVariableSetId string
    • LibraryVariableSetName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "OwnerId": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Create or Update the common variables associated with the tenant

PUT /api/{spaceId}/tenants/{tenantId}/commonvariables

Path Parameters

  • spaceId string (required)
  • tenantId string (required)

Request Body

  • ConcurrencyToken string
    The concurrency token returned when reading the tenant’s variables. Always pass it back so the write is rejected if someone else changed the variables since your read; omitting it skips the check and risks silently overwriting their changes.
  • SpaceId string (required)
  • TenantId string (required)
  • Variables array of object (required)
    The complete set of common variable values for the tenant; existing values omitted here are deleted. Each item is an object: ‘Id’ (the existing value’s ID when updating; omit when adding), ‘OwnerId’ (the library variable set ID), ‘TemplateId’ (the variable template ID), ‘Value’ (a plain string for non-sensitive values, or {“HasValue”: true, “NewValue”: “secret”} for sensitive ones), and ‘Scope’ ({“EnvironmentIds”: […]} limiting the value to those environments; empty applies to all).
    • Id string
    • OwnerId string (required)
      Minimum length 1.
    • Scope object (required)
    • TemplateId string (required)
      Minimum length 1.
    • Value object (required)

Response

200 — The common variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • LibraryVariableSetId string
    • LibraryVariableSetName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "OwnerId": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Create or Update the common variables associated with the tenant

PUT /api/spaces/{spaceIdentifier}/tenants/{tenantId}/commonvariables

Also reachable at /api/tenants/{tenantId}/commonvariables.

Path Parameters

  • spaceIdentifier string (required)
    Identifier (ID or slug) of the space.
  • tenantId string (required)

Request Body

  • ConcurrencyToken string
    The concurrency token returned when reading the tenant’s variables. Always pass it back so the write is rejected if someone else changed the variables since your read; omitting it skips the check and risks silently overwriting their changes.
  • SpaceId string (required)
  • TenantId string (required)
  • Variables array of object (required)
    The complete set of common variable values for the tenant; existing values omitted here are deleted. Each item is an object: ‘Id’ (the existing value’s ID when updating; omit when adding), ‘OwnerId’ (the library variable set ID), ‘TemplateId’ (the variable template ID), ‘Value’ (a plain string for non-sensitive values, or {“HasValue”: true, “NewValue”: “secret”} for sensitive ones), and ‘Scope’ ({“EnvironmentIds”: […]} limiting the value to those environments; empty applies to all).
    • Id string
    • OwnerId string (required)
      Minimum length 1.
    • Scope object (required)
    • TemplateId string (required)
      Minimum length 1.
    • Value object (required)

Response

200 — The common variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • LibraryVariableSetId string
    • LibraryVariableSetName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "OwnerId": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "LibraryVariableSetId": "LibraryVariableSets-1",
      "LibraryVariableSetName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Get the project variables associated with the tenant

GET /api/{spaceId}/tenants/{tenantId}/projectvariables

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{tenantId}/projectvariables, /api/tenants/{tenantId}/projectvariables.

Path Parameters

  • spaceId string (required)
  • tenantId string (required)
    The ID of the tenant to read project variable values for. Example: Tenants-101.

Query Parameters

  • includeMissingVariables boolean
    When true, the response also lists the project variable templates the tenant is required to supply a value for but has not, along with each template’s default value.

Response

200 — The project variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • MissingVariables array of object
    • ProjectId string
    • ProjectName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • ProjectId string
    • ProjectName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "MissingVariables": [
    {
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ],
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Create or Update the project variables associated with the tenant

POST /api/{spaceId}/tenants/{tenantId}/projectvariables

Also reachable at /api/spaces/{spaceIdentifier}/tenants/{tenantId}/projectvariables, /api/tenants/{tenantId}/projectvariables.

Path Parameters

  • spaceId string (required)
  • tenantId string (required)

Request Body

  • ConcurrencyToken string
    The concurrency token returned when reading the tenant’s variables. Always pass it back so the write is rejected if someone else changed the variables since your read; omitting it skips the check and risks silently overwriting their changes.
  • SpaceId string (required)
  • TenantId string (required)
  • Variables array of object (required)
    The complete set of project variable values for the tenant; existing values omitted here are deleted. Each item is an object: ‘Id’ (the existing value’s ID when updating; omit when adding), ‘OwnerId’ (the project ID), ‘TemplateId’ (the variable template ID), ‘Value’ (a plain string for non-sensitive values, or {“HasValue”: true, “NewValue”: “secret”} for sensitive ones), and ‘Scope’ ({“EnvironmentIds”: […]} limiting the value to those environments; empty applies to all).
    • Id string
    • OwnerId string (required)
      Minimum length 1.
    • Scope object (required)
    • TemplateId string (required)
      Minimum length 1.
    • Value object (required)

Response

200 — The project variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • ProjectId string
    • ProjectName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "OwnerId": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Create or Update the project variables associated with the tenant

PUT /api/{spaceId}/tenants/{tenantId}/projectvariables

Path Parameters

  • spaceId string (required)
  • tenantId string (required)

Request Body

  • ConcurrencyToken string
    The concurrency token returned when reading the tenant’s variables. Always pass it back so the write is rejected if someone else changed the variables since your read; omitting it skips the check and risks silently overwriting their changes.
  • SpaceId string (required)
  • TenantId string (required)
  • Variables array of object (required)
    The complete set of project variable values for the tenant; existing values omitted here are deleted. Each item is an object: ‘Id’ (the existing value’s ID when updating; omit when adding), ‘OwnerId’ (the project ID), ‘TemplateId’ (the variable template ID), ‘Value’ (a plain string for non-sensitive values, or {“HasValue”: true, “NewValue”: “secret”} for sensitive ones), and ‘Scope’ ({“EnvironmentIds”: […]} limiting the value to those environments; empty applies to all).
    • Id string
    • OwnerId string (required)
      Minimum length 1.
    • Scope object (required)
    • TemplateId string (required)
      Minimum length 1.
    • Value object (required)

Response

200 — The project variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • ProjectId string
    • ProjectName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "OwnerId": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Create or Update the project variables associated with the tenant

PUT /api/spaces/{spaceIdentifier}/tenants/{tenantId}/projectvariables

Also reachable at /api/tenants/{tenantId}/projectvariables.

Path Parameters

  • spaceIdentifier string (required)
    Identifier (ID or slug) of the space.
  • tenantId string (required)

Request Body

  • ConcurrencyToken string
    The concurrency token returned when reading the tenant’s variables. Always pass it back so the write is rejected if someone else changed the variables since your read; omitting it skips the check and risks silently overwriting their changes.
  • SpaceId string (required)
  • TenantId string (required)
  • Variables array of object (required)
    The complete set of project variable values for the tenant; existing values omitted here are deleted. Each item is an object: ‘Id’ (the existing value’s ID when updating; omit when adding), ‘OwnerId’ (the project ID), ‘TemplateId’ (the variable template ID), ‘Value’ (a plain string for non-sensitive values, or {“HasValue”: true, “NewValue”: “secret”} for sensitive ones), and ‘Scope’ ({“EnvironmentIds”: […]} limiting the value to those environments; empty applies to all).
    • Id string
    • OwnerId string (required)
      Minimum length 1.
    • Scope object (required)
    • TemplateId string (required)
      Minimum length 1.
    • Value object (required)

Response

200 — The project variables associated with a tenant.

  • ConcurrencyToken string
    Minimum length 1.
  • TenantId string
  • Variables array of object
    • Id string
      Minimum length 1.
    • ProjectId string
    • ProjectName string
    • Scope object
    • Template object
    • TemplateId string
      Minimum length 1.
    • Value object

Example Request

JSON
{
  "ConcurrencyToken": "string",
  "SpaceId": "Spaces-1",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "OwnerId": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

Example Response

JSON
{
  "ConcurrencyToken": "string",
  "TenantId": "Tenants-1",
  "Variables": [
    {
      "Id": "string",
      "ProjectId": "Projects-1",
      "ProjectName": "string",
      "Scope": {
        "EnvironmentIds": [
          "Environments-1",
          "..."
        ]
      },
      "Template": {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      },
      "TemplateId": "string",
      "Value": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      }
    }
  ]
}

List all of the tenant variables in the supplied Octopus Deploy Space. The results will be sorted alphabetically by id

GET /api/{spaceId}/tenantvariables/all

Also reachable at /api/spaces/{spaceIdentifier}/tenantvariables/all, /api/tenantvariables/all.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • projectId string
    ID of a project that tenants must be connected to, to be included in the result set. For matching tenants, variables from all projects are still returned.

Response

200 — All of the tenant variables in the supplied Octopus Deploy Space (sorted alphabetically by id).

  • ConcurrencyToken string
  • Id string
    Gets or sets a unique identifier for this resource.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LibraryVariables object
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • ProjectVariables object
  • SpaceId string
  • TenantId string
  • TenantName string

Example Response

JSON
[
  {
    "ConcurrencyToken": "string",
    "Id": "string",
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "LibraryVariables": {
      "additionalProp1": {
        "LibraryVariableSetId": "string",
        "LibraryVariableSetName": "string",
        "Links": {},
        "Templates": [
          {}
        ],
        "Variables": {}
      },
      "additionalProp2": {
        "LibraryVariableSetId": "string",
        "LibraryVariableSetName": "string",
        "Links": {},
        "Templates": [
          {}
        ],
        "Variables": {}
      },
      "additionalProp3": {
        "LibraryVariableSetId": "string",
        "LibraryVariableSetName": "string",
        "Links": {},
        "Templates": [
          {}
        ],
        "Variables": {}
      }
    },
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "ProjectVariables": {
      "additionalProp1": {
        "Links": {},
        "ProjectId": "string",
        "ProjectName": "string",
        "Templates": [
          {}
        ],
        "Variables": {}
      },
      "additionalProp2": {
        "Links": {},
        "ProjectId": "string",
        "ProjectName": "string",
        "Templates": [
          {}
        ],
        "Variables": {}
      },
      "additionalProp3": {
        "Links": {},
        "ProjectId": "string",
        "ProjectName": "string",
        "Templates": [
          {}
        ],
        "Variables": {}
      }
    },
    "SpaceId": "Spaces-1",
    "TenantId": "Tenants-1",
    "TenantName": "string"
  }
]