Sign in Start for free

Scoped User Roles

List the name and ID of all of the scoped user roles in the supplied Octopus Deploy Space. The results will be sorted by name

GET /api/{spaceId}/scopeduserroles

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

Path Parameters

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

Query Parameters

  • ids array of 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 — The requested list of Scoped User Roles

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • EnvironmentIds array of 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.
    • 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.
    • ProjectGroupIds array of string
    • ProjectIds array of string
    • SpaceId string
    • TeamId string
    • TenantIds array of string
    • UserRoleId string
  • 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": [
    {
      "EnvironmentIds": [
        "Environments-1",
        "..."
      ],
      "Id": "string",
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ProjectGroupIds": [
        "string"
      ],
      "ProjectIds": [
        "Projects-1",
        "..."
      ],
      "SpaceId": "Spaces-1",
      "TeamId": "string",
      "TenantIds": [
        "Tenants-1",
        "..."
      ],
      "UserRoleId": "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 scoped user role

POST /api/{spaceId}/scopeduserroles

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

Path Parameters

  • spaceId string (required)

Request Body

  • EnvironmentIds array of string
  • ProjectGroupIds array of string
  • ProjectIds array of string
  • SpaceId string
  • TeamId string (required)
    Minimum length 1.
  • TenantIds array of string
  • UserRoleId string (required)
    Minimum length 1.

Response

201 — Created

  • EnvironmentIds array of 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.
  • 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.
  • ProjectGroupIds array of string
  • ProjectIds array of string
  • SpaceId string
  • TeamId string
  • TenantIds array of string
  • UserRoleId string

Example Request

JSON
{
  "EnvironmentIds": [
    "Environments-1",
    "..."
  ],
  "ProjectGroupIds": [
    "ProjectGroups-1",
    "..."
  ],
  "ProjectIds": [
    "Projects-1",
    "..."
  ],
  "SpaceId": "Spaces-1",
  "TeamId": "string",
  "TenantIds": [
    "Tenants-1",
    "..."
  ],
  "UserRoleId": "string"
}

Example Response

JSON
{
  "EnvironmentIds": [
    "Environments-1",
    "..."
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectGroupIds": [
    "string"
  ],
  "ProjectIds": [
    "Projects-1",
    "..."
  ],
  "SpaceId": "Spaces-1",
  "TeamId": "string",
  "TenantIds": [
    "Tenants-1",
    "..."
  ],
  "UserRoleId": "string"
}

Get a Scoped User Role by ID

GET /api/{spaceId}/scopeduserroles/{id}

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

Path Parameters

  • id string (required)
  • spaceId string (required)
    The ID of the space containing the resources.

Response

200 — Scoped User Role.

  • EnvironmentIds array of 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.
  • 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.
  • ProjectGroupIds array of string
  • ProjectIds array of string
  • SpaceId string
  • TeamId string
  • TenantIds array of string
  • UserRoleId string

Example Response

JSON
{
  "EnvironmentIds": [
    "Environments-1",
    "..."
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectGroupIds": [
    "string"
  ],
  "ProjectIds": [
    "Projects-1",
    "..."
  ],
  "SpaceId": "Spaces-1",
  "TeamId": "string",
  "TenantIds": [
    "Tenants-1",
    "..."
  ],
  "UserRoleId": "string"
}

Modify a scoped user role

PUT /api/{spaceId}/scopeduserroles/{id}

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

Path Parameters

  • id string (required)
    The ID of the scoped user role to modify.
  • spaceId string (required)

Request Body

  • EnvironmentIds array of string
  • Id string (required)
    The ID of the scoped user role to modify. Minimum length 1.
  • ProjectGroupIds array of string
  • ProjectIds array of string
  • SpaceId string
  • TeamId string (required)
    Minimum length 1.
  • TenantIds array of string
  • UserRoleId string (required)
    Minimum length 1.

Response

200 — Confirmation that the Scoped User Role was modified, containing the updated Role

  • EnvironmentIds array of 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.
  • 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.
  • ProjectGroupIds array of string
  • ProjectIds array of string
  • SpaceId string
  • TeamId string
  • TenantIds array of string
  • UserRoleId string

Example Request

JSON
{
  "EnvironmentIds": [
    "Environments-1",
    "..."
  ],
  "Id": "string",
  "ProjectGroupIds": [
    "ProjectGroups-1",
    "..."
  ],
  "ProjectIds": [
    "Projects-1",
    "..."
  ],
  "SpaceId": "Spaces-1",
  "TeamId": "string",
  "TenantIds": [
    "Tenants-1",
    "..."
  ],
  "UserRoleId": "string"
}

Example Response

JSON
{
  "EnvironmentIds": [
    "Environments-1",
    "..."
  ],
  "Id": "string",
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ProjectGroupIds": [
    "string"
  ],
  "ProjectIds": [
    "Projects-1",
    "..."
  ],
  "SpaceId": "Spaces-1",
  "TeamId": "string",
  "TenantIds": [
    "Tenants-1",
    "..."
  ],
  "UserRoleId": "string"
}

Delete an existing Scoped User Role

DELETE /api/{spaceId}/scopeduserroles/{id}

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

Path Parameters

  • id string (required)
    ID of the Scoped User Role to delete.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — Success