Sign in Start for free

Users

Get a list of Users

GET /api/users

Lists all of the Users in the current Octopus Deploy instance, from all Teams. The results will be sorted alphabetically by username.

Query Parameters

  • filter string
    Filters the Users by Username/DisplayName/EmailAddress/IdentificationToken using the specified filter fragment.
  • isActive boolean
    A filter to return only active (true) or disabled (false) users. Omit to return both.
  • isServiceAccount boolean
    A filter to return only service account users.
  • serviceAccountType enum
    A filter to return only service accounts of the specified type.
    Allowed values: Standard, Agent.
  • 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 — Users that meet the filter conditions

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • CanPasswordBeEdited boolean
    • Created string
      Format date-time.
    • DisplayName string
      Maximum length 64.
    • EmailAddress string
      Format email. Maximum length 256.
    • Id string
      Gets or sets a unique identifier for this resource.
    • Identities array of object
    • IsActive boolean
    • IsRequestor boolean
      Gets or sets a value indicating whether this user resource represents the user who requested it.
    • IsService 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.
    • Password string
    • ServiceAccountType enum
      Allowed values: Standard, Agent.
    • Username string
      Maximum length 64.
  • 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": [
    {
      "CanPasswordBeEdited": true,
      "Created": "2020-01-01T00:00:00.000Z",
      "DisplayName": "string",
      "EmailAddress": "user@example.com",
      "Id": "string",
      "Identities": [
        {}
      ],
      "IsActive": true,
      "IsRequestor": true,
      "IsService": true,
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Password": "string",
      "ServiceAccountType": "Standard",
      "Username": "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 user

POST /api/users

Request Body

  • DisplayName string (required)
    Minimum length 1.
  • EmailAddress string
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsService boolean
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string (required)
    Minimum length 1.

Response

201 — Created

  • CanPasswordBeEdited boolean
  • Created string
    Format date-time.
  • DisplayName string
    Maximum length 64.
  • EmailAddress string
    Format email. Maximum length 256.
  • Id string
    Gets or sets a unique identifier for this resource.
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsRequestor boolean
    Gets or sets a value indicating whether this user resource represents the user who requested it.
  • IsService 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.
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string
    Maximum length 64.

Example Request

JSON
{
  "DisplayName": "string",
  "EmailAddress": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "IsService": true,
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": true,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "IsRequestor": true,
  "IsService": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

Get a list of Users

GET /api/users/all

Lists all the Users in the System. The results will be sorted alphabetically by Username.

Response

200 — A list of all the users

  • CanPasswordBeEdited boolean
  • Created string
    Format date-time.
  • DisplayName string
    Maximum length 64.
  • EmailAddress string
    Format email. Maximum length 256.
  • Id string
    Gets or sets a unique identifier for this resource.
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsRequestor boolean
    Gets or sets a value indicating whether this user resource represents the user who requested it.
  • IsService 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.
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string
    Maximum length 64.

Example Response

JSON
[
  {
    "CanPasswordBeEdited": true,
    "Created": "2020-01-01T00:00:00.000Z",
    "DisplayName": "string",
    "EmailAddress": "user@example.com",
    "Id": "string",
    "Identities": [
      {
        "Claims": {},
        "IdentityProviderName": "string"
      }
    ],
    "IsActive": true,
    "IsRequestor": true,
    "IsService": true,
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Password": "string",
    "ServiceAccountType": "Standard",
    "Username": "string"
  }
]

Provide the details of the enabled authentication providers and whether the current user can edit logins for the given user

GET /api/users/authentication/{userId}

Also reachable at /api/users/authentication.

Path Parameters

  • userId string (required)

Response

200 — The currently enabled authentication providers

  • AuthenticationProviders array of object
    • CSSLinks array of string
    • DisplayName string
    • FormsLoginEnabled boolean
    • IdentityType enum
      Allowed values: Guest, UsernamePassword, ActiveDirectory, OAuth.
    • JavascriptLinks array of string
    • Links object
    • Name string
  • CanCurrentUserEditIdentitiesForUser boolean
  • Links object

Example Response

JSON
{
  "AuthenticationProviders": [
    {
      "CSSLinks": [
        "string"
      ],
      "DisplayName": "string",
      "FormsLoginEnabled": true,
      "IdentityType": "Guest",
      "JavascriptLinks": [
        "string"
      ],
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string"
    }
  ],
  "CanCurrentUserEditIdentitiesForUser": true,
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}

Search for users, using the authentication providers

GET /api/users/external-search

Query Parameters

  • partialName string (required)

Response

200 — The results of the external user provider search

  • Links object
  • Results array of object
    • Identities array of object

Example Response

JSON
{
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Results": [
    {
      "Identities": [
        {}
      ]
    }
  ]
}

Get the metadata to describe the claims/fields used by authentication providers that support identities

GET /api/users/identity-metadata

Response

200 — The user identity metadata

  • Links object
  • Providers array of object
    • ClaimDescriptors array of object
    • IdentityProviderName string
    • Links object
    • ScimEnabled boolean

Example Response

JSON
{
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Providers": [
    {
      "ClaimDescriptors": [
        {}
      ],
      "IdentityProviderName": "string",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "ScimEnabled": true
    }
  ]
}

Log in

POST /api/users/login

Request Body

  • Password string (required)
    The password to log in with. Minimum length 1.
  • RememberMe boolean
    Whether the cookie should be persistent.
  • RemoteIpAddress string
    IP Address of the user.
  • State object
    • RedirectAfterLoginTo string
      The Url, relative to the portal site, to redirect to post successful login.
    • UsingSecureConnection boolean
      Whether the client says it’s using a secure connection. We need this because SSL offloading can obscure this and the server cannot tell whether the client initiated the call using a secure connection.
  • Username string (required)
    The username to log in with. Minimum length 1.

Response

200 — The details of a successful login

  • CanPasswordBeEdited boolean
  • Created string
    Format date-time.
  • DisplayName string
    Maximum length 64.
  • EmailAddress string
    Format email. Maximum length 256.
  • Id string
    Gets or sets a unique identifier for this resource.
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsRequestor boolean
    Gets or sets a value indicating whether this user resource represents the user who requested it.
  • IsService 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.
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string
    Maximum length 64.

Example Request

JSON
{
  "Password": "string",
  "RememberMe": true,
  "RemoteIpAddress": "string",
  "State": {
    "RedirectAfterLoginTo": "string",
    "UsingSecureConnection": true
  },
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": true,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "IsRequestor": true,
  "IsService": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

POST /api/users/logout

POST /api/users/logout

Logs out the current user.

Response

200 — Success

Get information about the current user

GET /api/users/me

Response

200 — The current user’s details

  • CanPasswordBeEdited boolean
  • Created string
    Format date-time.
  • DisplayName string
    Maximum length 64.
  • EmailAddress string
    Format email. Maximum length 256.
  • Id string
    Gets or sets a unique identifier for this resource.
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsRequestor boolean
    Gets or sets a value indicating whether this user resource represents the user who requested it.
  • IsService 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.
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string
    Maximum length 64.

Example Response

JSON
{
  "CanPasswordBeEdited": true,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "IsRequestor": true,
  "IsService": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

POST /api/users/register

Request Body

  • DisplayName string (required)
    Minimum length 1.
  • EmailAddress string
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • InvitationCode string (required)
    Minimum length 1.
  • Password string (required)
    Minimum length 1.
  • Username string (required)
    Minimum length 1.

Response

201 — Created

  • CanPasswordBeEdited boolean
  • Created string
    Format date-time.
  • DisplayName string
    Maximum length 64.
  • EmailAddress string
    Format email. Maximum length 256.
  • Id string
    Gets or sets a unique identifier for this resource.
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsRequestor boolean
    Gets or sets a value indicating whether this user resource represents the user who requested it.
  • IsService 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.
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string
    Maximum length 64.

Example Request

JSON
{
  "DisplayName": "string",
  "EmailAddress": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "InvitationCode": "string",
  "Password": "string",
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": true,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "IsRequestor": true,
  "IsService": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

Get a User by ID

GET /api/users/{id}

Path Parameters

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

Response

200 — The user details

  • CanPasswordBeEdited boolean
  • Created string
    Format date-time.
  • DisplayName string
    Maximum length 64.
  • EmailAddress string
    Format email. Maximum length 256.
  • Id string
    Gets or sets a unique identifier for this resource.
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsRequestor boolean
    Gets or sets a value indicating whether this user resource represents the user who requested it.
  • IsService 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.
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string
    Maximum length 64.

Example Response

JSON
{
  "CanPasswordBeEdited": true,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "IsRequestor": true,
  "IsService": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

Modify an existing user

PUT /api/users/{id}

Path Parameters

  • id string (required)

Request Body

  • DisplayName string (required)
    Minimum length 1.
  • EmailAddress string
  • Id string (required)
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean (required)
  • Password string
  • Username string (required)
    Minimum length 1.

Response

200 — The updated user

  • CanPasswordBeEdited boolean
  • Created string
    Format date-time.
  • DisplayName string
    Maximum length 64.
  • EmailAddress string
    Format email. Maximum length 256.
  • Id string
    Gets or sets a unique identifier for this resource.
  • Identities array of object
    • Claims object
    • IdentityProviderName string
  • IsActive boolean
  • IsRequestor boolean
    Gets or sets a value indicating whether this user resource represents the user who requested it.
  • IsService 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.
  • Password string
  • ServiceAccountType enum
    Allowed values: Standard, Agent.
  • Username string
    Maximum length 64.

Example Request

JSON
{
  "DisplayName": "string",
  "EmailAddress": "string",
  "Id": "Users-1",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "Password": "string",
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": true,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": true,
  "IsRequestor": true,
  "IsService": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

Delete an existing User

DELETE /api/users/{id}

Path Parameters

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

Response

200 — Success

Revoke all sessions for a user

PUT /api/users/{userId}/revoke-sessions

Path Parameters

  • userId string (required)
    ID of the User to revoke.

Response

200 — Empty response, indicating the sessions have been revoked

Example Response

JSON
{}