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
    The type of item in this list.
  • 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": "User",
  "Items": [
    {
      "CanPasswordBeEdited": false,
      "Created": "2020-01-01T00:00:00.000Z",
      "DisplayName": "string",
      "EmailAddress": "user@example.com",
      "Id": "string",
      "Identities": [
        {}
      ],
      "IsActive": false,
      "IsRequestor": false,
      "IsService": false,
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "Self": "/api/..."
      },
      "Password": "string",
      "ServiceAccountType": "Standard",
      "Username": "string"
    }
  ],
  "ItemsPerPage": 30,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LastPageNumber": 1,
  "Links": {
    "Self": "/api/..."
  },
  "NumberOfPages": 2,
  "TotalResults": 42
}

Create a new user

POST /api/users

Request Body

  • DisplayName string (required)
    Minimum length 1.
  • EmailAddress string
  • Identities array of object
    • Claims object
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "IsService": false,
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": false,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "IsRequestor": false,
  "IsService": false,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "Self": "/api/..."
  },
  "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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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": false,
    "Created": "2020-01-01T00:00:00.000Z",
    "DisplayName": "string",
    "EmailAddress": "user@example.com",
    "Id": "string",
    "Identities": [
      {
        "Claims": {},
        "Id": "string",
        "IdentityProviderName": "string"
      }
    ],
    "IsActive": false,
    "IsRequestor": false,
    "IsService": false,
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "Self": "/api/..."
    },
    "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": false,
      "IdentityType": "Guest",
      "JavascriptLinks": [
        "string"
      ],
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "Name": "string"
    }
  ],
  "CanCurrentUserEditIdentitiesForUser": false,
  "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": false
    }
  ]
}

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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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": false,
  "RemoteIpAddress": "string",
  "State": {
    "RedirectAfterLoginTo": "string",
    "UsingSecureConnection": false
  },
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": false,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "IsRequestor": false,
  "IsService": false,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "Self": "/api/..."
  },
  "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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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": false,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "IsRequestor": false,
  "IsService": false,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "Self": "/api/..."
  },
  "Password": "string",
  "ServiceAccountType": "Standard",
  "Username": "string"
}

POST /api/users/register

Unless the first administrator user is being registered, an invitation code must be provided.

Request Body

  • DisplayName string (required)
    Minimum length 1.
  • EmailAddress 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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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",
  "InvitationCode": "string",
  "Password": "string",
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": false,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "IsRequestor": false,
  "IsService": false,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "Self": "/api/..."
  },
  "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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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": false,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "IsRequestor": false,
  "IsService": false,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "Self": "/api/..."
  },
  "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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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
    • Id string
      The login’s ID, or null for a login that hasn’t been saved. Send it back unchanged to update the login in place. Any ID that doesn’t exist in the list of the user’s identities will be treated as if the ID was not specified.
    • 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": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "Password": "string",
  "Username": "string"
}

Example Response

JSON
{
  "CanPasswordBeEdited": false,
  "Created": "2020-01-01T00:00:00.000Z",
  "DisplayName": "string",
  "EmailAddress": "user@example.com",
  "Id": "string",
  "Identities": [
    {
      "Claims": {
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      },
      "Id": "string",
      "IdentityProviderName": "string"
    }
  ],
  "IsActive": false,
  "IsRequestor": false,
  "IsService": false,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "Self": "/api/..."
  },
  "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

Get the profile picture uploaded by a user

GET /api/users/{userId}/avatar

Any signed-in user can view any user’s profile picture, as they appear alongside audit events and team members.

Path Parameters

  • userId string (required)
    The ID of the user.

Query Parameters

  • cb string
    The cache buster from the user’s Avatar link. Only a request for the current picture is cached indefinitely.

Response

200 — Success

Example Response

JSON
"string"

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
{}