User

This contains APIs related to User as defined in Harness

Add user(s) to scope

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema:
emails
required
Array of strings [ 0 .. 100 ] items
Array of objects (RoleBinding)
userGroups
Array of strings
Responses
400

Bad Request

500

Internal server error

default

Returns list of added users to a given scope

post/ng/api/user/users
Request samples
{
  • "emails": [
    ],
  • "roleBindings": [
    ],
  • "userGroups": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Change user password

Updates the User password

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:
currentPassword
string

This is the current password.

newPassword
string

This is the new password.

Responses
400

Bad Request

500

Internal server error

default

Returns whether the operation is successful or not with readable response.

put/ng/api/user/password
Request samples
{
  • "currentPassword": "string",
  • "newPassword": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Check if user is last admin

Check whether the user is last admin at scope or not

SecurityApiKey
Request
query Parameters
userId
string

User identifier

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns Boolean status whether the user is last admin at scope or not

get/ng/api/user/last-admin
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Disable two factor authentication

Disables two-factor-auth for an user in an account

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns user information

put/ng/api/user/disable-two-factor-auth
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Enable two factor authentication

Enables two-factor-auth for an user in an account

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:
userId
string
email
string
twoFactorAuthenticationEnabled
boolean
mechanism
string
Value: "TOTP"
totpSecretKey
string
totpqrurl
string
Responses
400

Bad Request

500

Internal server error

default

Returns user information

put/ng/api/user/enable-two-factor-auth
Request samples
{
  • "userId": "string",
  • "email": "string",
  • "twoFactorAuthenticationEnabled": true,
  • "mechanism": "TOTP",
  • "totpSecretKey": "string",
  • "totpqrurl": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get Current User Info

Gets current logged in User information

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns current logged in user info

get/ng/api/user/currentUser
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get detailed user information

Returns the user metadata along with rolesAssignments by userId and scope

SecurityApiKey
Request
path Parameters
userId
required
string

user Identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns the user metadata along with rolesAssignments by userId and scope

get/ng/api/user/aggregate/{userId}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get list of users

List of all the user's metadata along with rolesAssignments who have access to given scope

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

searchTerm
string

Search term

pageIndex
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

Request Body schema:
resourceGroupIdentifiers
Array of strings unique
roleIdentifiers
Array of strings unique
Responses
400

Bad Request

500

Internal server error

default

Returns list of all the user's metadata along with rolesAssignments who have access to given scope

post/ng/api/user/aggregate
Request samples
{
  • "resourceGroupIdentifiers": [
    ],
  • "roleIdentifiers": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get users list

Get list of user's for a given scope

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

pageIndex
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

Request Body schema:
searchTerm
string

This string will be used to filter the results. Details of all the users having this string in their name or email address will be filtered.

identifiers
Array of strings unique

Filter by User Identifiers

parentFilter
string
Enum: "NO_PARENT_SCOPES" "INCLUDE_PARENT_SCOPES" "STRICTLY_PARENT_SCOPES"
Responses
400

Bad Request

500

Internal server error

default

Returns the list of user's Metadata for a given scope

post/ng/api/user/batch
Request samples
{
  • "searchTerm": "string",
  • "identifiers": [
    ],
  • "parentFilter": "NO_PARENT_SCOPES"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets Two Factor Auth Settings

Gets two factor authentication settings information of the current logged in user

SecurityApiKey
Request
path Parameters
authMechanism
required
string

This is the authentication mechanism for the logged-in User. Two-Factor Authentication settings will be fetched for this mechanism.

Value: "TOTP"
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns current logged in user's two factor authentication info

get/ng/api/user/two-factor-auth/{authMechanism}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Remove user from scope

Remove user as the collaborator from the scope

SecurityApiKey
Request
path Parameters
userId
required
string

user Identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns Boolean status whether request was successful or not

delete/ng/api/user/{userId}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Unlock user

unlock user in a given scope

SecurityApiKey
Request
path Parameters
userId
required
string

user Identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns user information

put/ng/api/user/unlock-user/{userId}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update User

Updates the User information

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:
uuid
string
name
string
email
string
token
string
defaultAccountId
string
intent
string
Array of objects (GatewayAccountRequest)
admin
boolean
twoFactorAuthenticationEnabled
boolean
emailVerified
boolean
locked
boolean
disabled
boolean
signupAction
string
edition
string
billingFrequency
string
object (UtmInfo)
externallyManaged
boolean
Responses
400

Bad Request

500

Internal server error

default

Returns the update User information

put/ng/api/user
Request samples
{
  • "uuid": "string",
  • "name": "string",
  • "email": "string",
  • "token": "string",
  • "defaultAccountId": "string",
  • "intent": "string",
  • "accounts": [
    ],
  • "admin": true,
  • "twoFactorAuthenticationEnabled": true,
  • "emailVerified": true,
  • "locked": true,
  • "disabled": true,
  • "signupAction": "string",
  • "edition": "string",
  • "billingFrequency": "string",
  • "utmInfo": {
    },
  • "externallyManaged": true
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}