user

Get a list of users

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
pageIndex
integer <int32>
Default: 0
pageSize
integer <int32> <= 100
Default: 50
sortOrders
Array of strings
Request Body schema:
searchTerm
string
identifiers
Array of strings unique
parentFilter
string
Enum: "NO_PARENT_SCOPES" "INCLUDE_PARENT_SCOPES" "STRICTLY_PARENT_SCOPES"
Responses
200

successful operation

400

Bad Request

500

Internal server error

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

Add users to a scope

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
Request Body schema:
emails
required
Array of strings [ 0 .. 100 ] items
required
Array of objects (RoleBinding)
userGroups
Array of strings
Responses
200

successful operation

400

Bad Request

500

Internal server error

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

Get users from current gen for an account

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
searchString
string
pageIndex
integer <int32>
Default: 0
pageSize
integer <int32> <= 100
Default: 50
sortOrders
Array of strings
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/user/currentgen
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/user/currentgen?accountIdentifier=string&searchString=string&pageIndex=0&pageSize=50&sortOrders=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

get two factor auth settings

Request
Security:
ApiKey (readwrite)
path Parameters
authMechanism
required
string
Value: "TOTP"
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/user/two-factor-auth/{authMechanism}
Request samples
curl -i -X GET \
  https://app.harness.io/gateway/ng/api/user/two-factor-auth/:authMechanism \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

enable two factor auth settings

Request
Security:
ApiKey (readwrite)
Request Body schema:
userId
string
email
string
twoFactorAuthenticationEnabled
boolean
mechanism
string
Value: "TOTP"
totpSecretKey
string
totpqrurl
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

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",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

disable two factor auth settings

Request
Security:
ApiKey (readwrite)
Responses
200

successful operation

400

Bad Request

500

Internal server error

put/ng/api/user/disable-two-factor-auth
Request samples
curl -i -X PUT \
  https://app.harness.io/gateway/ng/api/user/disable-two-factor-auth \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Change user password

Request
Security:
ApiKey (readwrite)
Request Body schema:
currentPassword
string
newPassword
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

put/ng/api/user/password
Request samples
{
  • "currentPassword": "string",
  • "newPassword": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "data": "PASSWORD_CHANGED",
  • "metaData": { },
  • "correlationId": "string"
}

unlock user

Request
Security:
ApiKey (readwrite)
path Parameters
userId
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

put/ng/api/user/unlock-user/{userId}
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/ng/api/user/unlock-user/:userId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

get user all projects information

Request
Security:
ApiKey (readwrite)
query Parameters
accountId
string
userId
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/user/all-projects
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/user/all-projects?accountId=string&userId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": [
    ],
  • "metaData": { },
  • "correlationId": "string"
}

Remove user as the collaborator from the scope

Request
Security:
ApiKey (readwrite)
path Parameters
userId
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

delete/ng/api/user/{userId}
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/user/:userId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": "SUCCESS",
  • "data": true,
  • "metaData": { },
  • "correlationId": "string"
}

get user project information

Request
Security:
ApiKey (readwrite)
query Parameters
accountId
string
pageIndex
integer <int32>
Default: 0
pageSize
integer <int32> <= 100
Default: 50
sortOrders
Array of strings
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/user/projects
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/user/projects?accountId=string&pageIndex=0&pageSize=50&sortOrders=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Get a user by userId for access control

Request
Security:
ApiKey (readwrite)
path Parameters
userId
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/user/aggregate/{userId}
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/user/aggregate/:userId?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Get a page of active users for access control

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
searchTerm
string
pageIndex
integer <int32>
Default: 0
pageSize
integer <int32> <= 100
Default: 50
sortOrders
Array of strings
Request Body schema:
resourceGroupIdentifiers
Array of strings unique
roleIdentifiers
Array of strings unique
Responses
200

successful operation

400

Bad Request

500

Internal server error

post/ng/api/user/aggregate
Request samples
{
  • "resourceGroupIdentifiers": [
    ],
  • "roleIdentifiers": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

update user information

Request
Security:
ApiKey (readwrite)
Request Body schema:
uuid
string
name
string
email
string
token
string
defaultAccountId
string
intent
string
Array of objects (GatewayAccountRequestDTO)
admin
boolean
twoFactorAuthenticationEnabled
boolean
emailVerified
boolean
locked
boolean
signupAction
string
edition
string
billingFrequency
string
object (UtmInfo)
Responses
200

successful operation

400

Bad Request

500

Internal server error

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,
  • "signupAction": "string",
  • "edition": "string",
  • "billingFrequency": "string",
  • "utmInfo": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

get current user information

Request
Security:
ApiKey (readwrite)
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/user/currentUser
Request samples
curl -i -X GET \
  https://app.harness.io/gateway/ng/api/user/currentUser \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}