Sign in Start for free

Library Variable Sets

List all of the library variable sets in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name

GET /api/{spaceId}/libraryvariablesets

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

Path Parameters

  • spaceId string (required)

Query Parameters

  • contentType string
    Filters by the purpose of the set: ‘Variables’ for ordinary variable sets or ‘ScriptModule’ for script modules. Omit to return both.
  • ids array of string
  • name string
    The exact name of a Library Variable Set to be matched.
  • partialName string
  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — All of the library variable sets in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name.

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • ContentType enum
      Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
      Allowed values: Variables, ScriptModule.
    • Description string
      Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
    • 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.
    • Name string
      Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
    • SpaceId string
    • Templates array of object
      Gets the variable templates.
    • VariableSetId string
      Gets or sets the id of the associated variable set.
    • Version integer
      Gets or sets the version number.
  • 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": [
    {
      "ContentType": "Variables",
      "Description": "string",
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string",
      "SpaceId": "string",
      "Templates": [
        {}
      ],
      "VariableSetId": "string",
      "Version": 0
    }
  ],
  "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 library variable set

POST /api/{spaceId}/libraryvariablesets

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

Path Parameters

  • spaceId string (required)

Request Body

  • ContentType enum
    Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
    Allowed values: Variables, ScriptModule.
  • Description string
    A description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
  • Name string (required)
    The name of this variable set. This should be short, preferably 5-20 characters. Minimum length 1.
  • SpaceId string (required)
  • Templates array of object
    Variable templates for tenant-specific values: each template defines a variable (name, label, help text, control type and default value) that every tenant connected to a linked project must supply a value for. Leave empty unless working with tenants.
    • DefaultValue object
    • DisplaySettings object
    • HelpText string
    • Id string
    • Label string
    • Name string

Response

201 — Created

  • ContentType enum
    Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
    Allowed values: Variables, ScriptModule.
  • Description string
    Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
  • 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.
  • Name string
    Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
  • SpaceId string
  • Templates array of object
    Gets the variable templates.
    • DefaultValue object
    • DisplaySettings object
    • HelpText string
    • Id string
    • Label string
    • Name string
  • VariableSetId string
    Gets or sets the id of the associated variable set.
  • Version integer
    Gets or sets the version number.

Example Request

JSON
{
  "ContentType": "Variables",
  "Description": "string",
  "Name": "string",
  "SpaceId": "string",
  "Templates": [
    {
      "DefaultValue": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      },
      "DisplaySettings": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "HelpText": "string",
      "Id": "string",
      "Label": "string",
      "Name": "string"
    }
  ]
}

Example Response

JSON
{
  "ContentType": "Variables",
  "Description": "string",
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "SpaceId": "string",
  "Templates": [
    {
      "DefaultValue": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      },
      "DisplaySettings": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "HelpText": "string",
      "Id": "string",
      "Label": "string",
      "Name": "string"
    }
  ],
  "VariableSetId": "string",
  "Version": 0
}

Get a list of Library Variable Sets

GET /api/{spaceId}/libraryvariablesets/all

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

Lists all the Library Variable Sets in the supplied 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

  • contentType string
    A content type use to filter Library Variable Sets.
  • ids array of string
    A list of Library Variable Set ids used to filter.

Response

200 — Requested list of Library Variable Sets

  • ContentType enum
    Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
    Allowed values: Variables, ScriptModule.
  • Description string
    Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
  • 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.
  • Name string
    Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
  • SpaceId string
  • Templates array of object
    Gets the variable templates.
    • DefaultValue object
    • DisplaySettings object
    • HelpText string
    • Id string
    • Label string
    • Name string
  • VariableSetId string
    Gets or sets the id of the associated variable set.
  • Version integer
    Gets or sets the version number.

Example Response

JSON
[
  {
    "ContentType": "Variables",
    "Description": "string",
    "Id": "string",
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Name": "string",
    "SpaceId": "string",
    "Templates": [
      {
        "DefaultValue": {},
        "DisplaySettings": {},
        "HelpText": "string",
        "Id": "string",
        "Label": "string",
        "Name": "string"
      }
    ],
    "VariableSetId": "string",
    "Version": 0
  }
]

Get a list of Library Variable Sets

GET /api/{spaceId}/libraryvariablesets/all/v1

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

Lists all the Library Variable Sets in the supplied 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

  • contentType string
    A content type use to filter Library Variable Sets.
  • ids array of string
    A list of Library Variable Set ids used to filter.

Response

200 — Requested list of Library Variable Sets

  • LibraryVariableSets array of object
    • ContentType enum
      Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
      Allowed values: Variables, ScriptModule.
    • Description string
      Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
    • 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.
    • Name string
      Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
    • SpaceId string
    • Templates array of object
      Gets the variable templates.
    • VariableSetId string
      Gets or sets the id of the associated variable set.
    • Version integer
      Gets or sets the version number.

Example Response

JSON
{
  "LibraryVariableSets": [
    {
      "ContentType": "Variables",
      "Description": "string",
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string",
      "SpaceId": "string",
      "Templates": [
        {}
      ],
      "VariableSetId": "string",
      "Version": 0
    }
  ]
}

Get a list of Library Variable Sets

POST /api/{spaceId}/libraryvariablesets/all/v1

Lists all the Library Variable Sets in the supplied 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

  • contentType string
    A content type use to filter Library Variable Sets.
  • ids array of string
    A list of Library Variable Set ids used to filter.

Response

200 — Requested list of Library Variable Sets

  • LibraryVariableSets array of object
    • ContentType enum
      Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
      Allowed values: Variables, ScriptModule.
    • Description string
      Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
    • 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.
    • Name string
      Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
    • SpaceId string
    • Templates array of object
      Gets the variable templates.
    • VariableSetId string
      Gets or sets the id of the associated variable set.
    • Version integer
      Gets or sets the version number.

Example Response

JSON
{
  "LibraryVariableSets": [
    {
      "ContentType": "Variables",
      "Description": "string",
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string",
      "SpaceId": "string",
      "Templates": [
        {}
      ],
      "VariableSetId": "string",
      "Version": 0
    }
  ]
}

Get a list of Library Variable Sets

POST /api/spaces/{spaceIdentifier}/libraryvariablesets/all/v1

Also reachable at /api/libraryvariablesets/all/v1.

Lists all the Library Variable Sets in the supplied Space. The results will be sorted alphabetically by name.

Path Parameters

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

Query Parameters

  • contentType string
    A content type use to filter Library Variable Sets.
  • ids array of string
    A list of Library Variable Set ids used to filter.

Response

200 — Requested list of Library Variable Sets

  • LibraryVariableSets array of object
    • ContentType enum
      Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
      Allowed values: Variables, ScriptModule.
    • Description string
      Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
    • 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.
    • Name string
      Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
    • SpaceId string
    • Templates array of object
      Gets the variable templates.
    • VariableSetId string
      Gets or sets the id of the associated variable set.
    • Version integer
      Gets or sets the version number.

Example Response

JSON
{
  "LibraryVariableSets": [
    {
      "ContentType": "Variables",
      "Description": "string",
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string",
      "SpaceId": "string",
      "Templates": [
        {}
      ],
      "VariableSetId": "string",
      "Version": 0
    }
  ]
}

Get a Library Variable Set by ID

GET /api/{spaceId}/libraryvariablesets/{id}

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

Path Parameters

  • id string (required)
    ID of the Library Variable Set to load.
  • spaceId string (required)

Response

200 — The Library Variable Set with matching ID.

  • ContentType enum
    Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
    Allowed values: Variables, ScriptModule.
  • Description string
    Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
  • 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.
  • Name string
    Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
  • SpaceId string
  • Templates array of object
    Gets the variable templates.
    • DefaultValue object
    • DisplaySettings object
    • HelpText string
    • Id string
    • Label string
    • Name string
  • VariableSetId string
    Gets or sets the id of the associated variable set.
  • Version integer
    Gets or sets the version number.

Example Response

JSON
{
  "ContentType": "Variables",
  "Description": "string",
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "SpaceId": "string",
  "Templates": [
    {
      "DefaultValue": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      },
      "DisplaySettings": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "HelpText": "string",
      "Id": "string",
      "Label": "string",
      "Name": "string"
    }
  ],
  "VariableSetId": "string",
  "Version": 0
}

Modify an existing library variable set

PUT /api/{spaceId}/libraryvariablesets/{id}

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

Path Parameters

  • id string (required)
    The ID of the library variable set.
  • spaceId string (required)

Request Body

  • Description string
  • Id string (required)
    The ID of the library variable set.
  • Name string (required)
    Minimum length 1.
  • SpaceId string (required)
  • Templates array of object
    • DefaultValue object
    • DisplaySettings object
    • HelpText string
    • Id string
    • Label string
    • Name string
  • Version integer

Response

200 — The modified library variable set.

  • ContentType enum
    Describes the purpose of the variable set. Clients can use this to offer an editing experience appropriately.
    Allowed values: Variables, ScriptModule.
  • Description string
    Gets or sets a description of this variable set that explains the purpose of the variable set to other users. This field may contain markdown.
  • 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.
  • Name string
    Gets or sets the name of this variable set. This should be short, preferably 5-20 characters.
  • SpaceId string
  • Templates array of object
    Gets the variable templates.
    • DefaultValue object
    • DisplaySettings object
    • HelpText string
    • Id string
    • Label string
    • Name string
  • VariableSetId string
    Gets or sets the id of the associated variable set.
  • Version integer
    Gets or sets the version number.

Example Request

JSON
{
  "Description": "string",
  "Id": "string",
  "Name": "string",
  "SpaceId": "string",
  "Templates": [
    {
      "DefaultValue": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      },
      "DisplaySettings": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "HelpText": "string",
      "Id": "string",
      "Label": "string",
      "Name": "string"
    }
  ],
  "Version": 0
}

Example Response

JSON
{
  "ContentType": "Variables",
  "Description": "string",
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Name": "string",
  "SpaceId": "string",
  "Templates": [
    {
      "DefaultValue": {
        "IsSensitive": true,
        "SensitiveValue": {},
        "Value": "string"
      },
      "DisplaySettings": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "HelpText": "string",
      "Id": "string",
      "Label": "string",
      "Name": "string"
    }
  ],
  "VariableSetId": "string",
  "Version": 0
}

Delete an existing Library Variable Set

DELETE /api/{spaceId}/libraryvariablesets/{id}

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

Path Parameters

  • id string (required)
    ID of the Library Variable Set to delete.
  • spaceId string (required)

Response

200 — Success

List projects and deployments which are using an library variable set

GET /api/{spaceId}/libraryvariablesets/{id}/usages

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

Path Parameters

  • id string (required)
    The ID of the Library Variable Set.
  • spaceId string (required)
    The ID of the space.

Response

200 — The usages of the library variable set.

  • CountOfProjectsUserCannotSee integer
  • CountOfReleasesUserCannotSee integer
  • CountOfRunbookSnapshotsUserCannotSee integer
  • Projects array of object
    • IsCurrentlyBeingUsedInProject boolean
    • ProjectId string
    • ProjectName string
    • ProjectSlug string
    • Releases array of object
    • RunbookSnapshots array of object

Example Response

JSON
{
  "CountOfProjectsUserCannotSee": 0,
  "CountOfReleasesUserCannotSee": 0,
  "CountOfRunbookSnapshotsUserCannotSee": 0,
  "Projects": [
    {
      "IsCurrentlyBeingUsedInProject": true,
      "ProjectId": "string",
      "ProjectName": "string",
      "ProjectSlug": "string",
      "Releases": [
        {}
      ],
      "RunbookSnapshots": [
        {}
      ]
    }
  ]
}