Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

User

This contains APIs related to User as defined in Harness

Add user to user groups

put

Adds the user to the specified user group IDs passed in the body and removes all other user groups for user except harness managed user groups

Path parameters
userIdstringRequired

User Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
userGroupIdsToAddstring[]Required
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/user/add-user-to-groups/{userId}
PUT /gateway/ng/api/user/add-user-to-groups/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "userGroupIdsToAdd": [
    "text"
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Add user(s) to scope

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
emailsstring[] · max: 100Required
userGroupsstring[]Optional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/user/users
POST /gateway/ng/api/user/users?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 259

{
  "emails": [
    "text"
  ],
  "roleBindings": [
    {
      "roleIdentifier": "text",
      "roleName": "text",
      "roleScopeLevel": "text",
      "resourceGroupIdentifier": "text",
      "resourceGroupName": "text",
      "managedRole": true
    }
  ],
  "userGroups": [
    "text"
  ],
  "userSettings": [
    {
      "identifier": "text",
      "value": "text"
    }
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Change user password

put

Updates the User password

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body

This is the view of the PasswordChange entity defined in Harness

currentPasswordstringOptional

This is the current password.

newPasswordstringOptional

This is the new password.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/user/password
PUT /gateway/ng/api/user/password?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "currentPassword": "text",
  "newPassword": "text"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Check if user is last admin

get

Check whether the user is last admin at scope or not

Query parameters
userIdstringOptional

User identifier

accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/user/last-admin
GET /gateway/ng/api/user/last-admin?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Disable two factor authentication

put

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

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/user/disable-two-factor-auth
PUT /gateway/ng/api/user/disable-two-factor-auth?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

end impersonation session for user

post
Path parameters
userIdstringRequired

User ID

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/user/endImpersonation/{userId}
POST /gateway/ng/api/user/endImpersonation/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Get detailed user information

get

Returns the user metadata along with rolesAssignments by userId and scope

Path parameters
userIdstringRequired

user Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/user/aggregate/{userId}
GET /gateway/ng/api/user/aggregate/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Get list of users

post

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

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

searchTermstringOptional

Search term

pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · max: 100Optional

Results per page(max 100)Default Value: 50

Default: 50
pageTokenstringOptional

Page Token of the next results to fetch.Default Value: ''

Body
resourceGroupIdentifiersstring[]Optional
roleIdentifiersstring[]Optional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/user/aggregate
POST /gateway/ng/api/user/aggregate?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "resourceGroupIdentifiers": [
    "text"
  ],
  "roleIdentifiers": [
    "text"
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Gets Two Factor Auth Settings

get

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

Path parameters
authMechanismstring · enumRequired

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

Possible values:
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/user/two-factor-auth/{authMechanism}
GET /gateway/ng/api/user/two-factor-auth/{authMechanism}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Get Current User Info

get

Gets current logged in User information

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/user/currentUser
GET /gateway/ng/api/user/currentUser?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Get users list

post

Get list of user's for a given scope

Query parameters
accountIdentifierstring · min: 1 · max: 2147483647Required

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · max: 100Optional

Results per page(max 100)Default Value: 50

Default: 50
pageTokenstringOptional

Page Token of the next results to fetch.Default Value: ''

Body
searchTermstringOptional

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.

identifiersstring[]Optional

Filter by User Identifiers

emailsstring[]Optional

Filter by User Emails

parentFilterstring · enumOptionalPossible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/user/batch
POST /gateway/ng/api/user/batch?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 96

{
  "searchTerm": "text",
  "identifiers": [
    "text"
  ],
  "emails": [
    "text"
  ],
  "parentFilter": "NO_PARENT_SCOPES"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

impersonate User

post
Path parameters
userIdstringRequired

User ID

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
reasonOfImpersonationstringRequired
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/user/impersonate/{userId}
POST /gateway/ng/api/user/impersonate/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "reasonOfImpersonation": "text"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Update User

put

Updates the User information

Path parameters
userIdstringRequired

User Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
namestringOptional
emailstringOptional
givenNamestringOptional
familyNamestringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/user/{userId}
PUT /gateway/ng/api/user/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "name": "text",
  "email": "text",
  "givenName": "text",
  "familyName": "text"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Remove user from scope

delete

Remove user as the collaborator from the scope

Path parameters
userIdstringRequired

user Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
delete/user/{userId}
DELETE /gateway/ng/api/user/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Reset two factor authorization

get

Reset Two-Factor authorization.

Path parameters
userIdstring · min: 1 · max: 2147483647Required
Query parameters
accountIdentifierstring · min: 1 · max: 2147483647Required
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/user/reset-two-factor-auth/{userId}
GET /gateway/ng/api/user/reset-two-factor-auth/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Unlock user

put

unlock user in a given scope

Path parameters
userIdstringRequired

user Identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/user/unlock-user/{userId}
PUT /gateway/ng/api/user/unlock-user/{userId}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Enable two factor authentication

put

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

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
userIdstringOptional
emailstringOptional
twoFactorAuthenticationEnabledbooleanOptional
mechanismstring · enumOptionalPossible values:
totpSecretKeystringOptional
totpqrurlstringOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/user/enable-two-factor-auth
PUT /gateway/ng/api/user/enable-two-factor-auth?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 131

{
  "userId": "text",
  "email": "text",
  "twoFactorAuthenticationEnabled": true,
  "mechanism": "TOTP",
  "totpSecretKey": "text",
  "totpqrurl": "text"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Update User

put

Updates the User information

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body
uuidstringOptional
namestringOptional
emailstringOptional
tokenstringOptional
defaultAccountIdstringOptional
intentstringOptional
adminbooleanOptional
twoFactorAuthenticationEnabledbooleanOptional
emailVerifiedbooleanOptional
lockedbooleanOptional
disabledbooleanOptional
signupActionstringOptional
editionstringOptional
billingFrequencystringOptional
externallyManagedbooleanOptional
givenNamestringOptional
familyNamestringOptional
externalIdstringOptional
createdAtinteger · int64Optional
lastUpdatedAtinteger · int64Optional
isEnrichedInfoCollectedbooleanOptional
lastLogininteger · int64Optional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/user
PUT /gateway/ng/api/user?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 753

{
  "uuid": "text",
  "name": "text",
  "email": "text",
  "token": "text",
  "defaultAccountId": "text",
  "intent": "text",
  "accounts": [
    {
      "uuid": "text",
      "accountName": "text",
      "companyName": "text",
      "defaultExperience": "NG",
      "createdFromNG": true,
      "isNextGenEnabled": true,
      "nextGenEnabled": true
    }
  ],
  "admin": true,
  "twoFactorAuthenticationEnabled": true,
  "emailVerified": true,
  "locked": true,
  "disabled": true,
  "signupAction": "text",
  "edition": "text",
  "billingFrequency": "text",
  "utmInfo": {
    "utmSource": "text",
    "utmContent": "text",
    "utmMedium": "text",
    "utmTerm": "text",
    "utmCampaign": "text"
  },
  "externallyManaged": true,
  "givenName": "text",
  "familyName": "text",
  "externalId": "text",
  "createdAt": 1,
  "lastUpdatedAt": 1,
  "userPreferences": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "isEnrichedInfoCollected": true,
  "lastLogin": 1
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?