User Group

This contains APIs related to User Group as defined in Harness

Unlink SSO Group from the User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
userGroupId
required
string

Identifier of the user group

query Parameters
retainMembers
boolean

Retain currently synced members of the user group

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 updated User Group after unlinking SSO Group

put/ng/api/user-groups/{userGroupId}/unlink
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/ng/api/user-groups/:userGroupId/unlink?retainMembers=true&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Link SAML Group to the User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
userGroupId
required
string

Identifier of the user group

samlId
required
string

Saml Group entity 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

Request Body schema:

Saml Link Group Request

samlGroupName
string
Responses
400

Bad Request

500

Internal server error

default

Returns the updated User Group after linking SAML Group

put/ng/api/user-groups/{userGroupId}/link/saml/{samlId}
Request samples
{
  • "samlGroupName": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List the users in a User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Identifier of the user group

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

Indicates the number of pages. Results for these pages will be retrieved.

pageSize
integer <int32>
Default: 50

The number of the elements to fetch

Array of objects (SortOrder)

Sort criteria for the elements.

Request Body schema:

Filter users based on multiple parameters

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 paginated list of the users in a User Group.

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

Check if the user is part of the user group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Identifier of the user group

userIdentifier
required
string

Identifier of the user

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

Return true/false based on whether the user is part of the user group

get/ng/api/user-groups/{identifier}/member/{userIdentifier}
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/user-groups/:identifier/member/:userIdentifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Add a user to the user group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Identifier of the user group

userIdentifier
required
string

Identifier of the user

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 updated user group after user addition

put/ng/api/user-groups/{identifier}/member/{userIdentifier}
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/ng/api/user-groups/:identifier/member/:userIdentifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Remove a user from the user group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Identifier of the user group

userIdentifier
required
string

Identifier of the user

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 updated user group after user removal

delete/ng/api/user-groups/{identifier}/member/{userIdentifier}
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/user-groups/:identifier/member/:userIdentifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get a User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Identifier of the user group

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 successfully fetched User Group

get/ng/api/user-groups/{identifier}
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/user-groups/:identifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Identifier of the user group

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 successfully deleted User Group

delete/ng/api/user-groups/{identifier}
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/user-groups/:identifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List the User Groups in an account/org/project

Request
Security:
ApiKey (readwrite)
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 filter which matches by user group name/identifier

pageIndex
integer <int32>
Default: 0

Indicates the number of pages. Results for these pages will be retrieved.

pageSize
integer <int32>
Default: 50

The number of the elements to fetch

Array of objects (SortOrder)

Sort criteria for the elements.

Responses
400

Bad Request

500

Internal server error

default

Returns the paginated list of the User Groups.

get/ng/api/user-groups
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/user-groups?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&searchTerm=string&pageIndex=0&pageSize=50&sortOrders=%5Bobject%20Object%5D' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
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:

User Group entity with the updates

accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
identifier
required
string
name
required
string
users
Array of strings
Array of objects (NotificationSettingConfigDTO)
isSsoLinked
boolean
linkedSsoId
string
linkedSsoDisplayName
string
ssoGroupId
string
ssoGroupName
string
externallyManaged
boolean
description
string [ 0 .. 1024 ] characters
object
ssoLinked
boolean
Responses
400

Bad Request

500

Internal server error

default

Returns the successfully updated User Group

put/ng/api/user-groups
Request samples
{
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "identifier": "string",
  • "name": "string",
  • "users": [
    ],
  • "notificationConfigs": [
    ],
  • "isSsoLinked": true,
  • "linkedSsoId": "string",
  • "linkedSsoDisplayName": "string",
  • "ssoGroupId": "string",
  • "ssoGroupName": "string",
  • "externallyManaged": true,
  • "description": "string",
  • "tags": {
    },
  • "ssoLinked": true
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create a User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
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:

User Group entity to be created

accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
identifier
required
string
name
required
string
users
Array of strings
Array of objects (NotificationSettingConfigDTO)
isSsoLinked
boolean
linkedSsoId
string
linkedSsoDisplayName
string
ssoGroupId
string
ssoGroupName
string
externallyManaged
boolean
description
string [ 0 .. 1024 ] characters
object
ssoLinked
boolean
Responses
400

Bad Request

500

Internal server error

default

Returns the successfully created User Group

post/ng/api/user-groups
Request samples
{
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "identifier": "string",
  • "name": "string",
  • "users": [
    ],
  • "notificationConfigs": [
    ],
  • "isSsoLinked": true,
  • "linkedSsoId": "string",
  • "linkedSsoDisplayName": "string",
  • "ssoGroupId": "string",
  • "ssoGroupName": "string",
  • "externallyManaged": true,
  • "description": "string",
  • "tags": {
    },
  • "ssoLinked": true
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List the User Groups selected by a filter in an account/org/project

Request
Security:
ApiKey (readwrite)
Request Body schema:

User Group Filter

databaseIdFilter
Array of strings unique

Filter by the internal database ids of user group

identifierFilter
Array of strings unique

Filter by the user group identifier

userIdentifierFilter
Array of strings unique

Filter by the users present in the user group

accountIdentifier
required
string

Filter by account using account identifier

orgIdentifier
string

Filter by organization using account identifier

projectIdentifier
string

Filter by project using account identifier

searchTerm
string

Filter by search term matching entities by name/identifier

Responses
400

Bad Request

500

Internal server error

default

Returns the list of the user groups selected by a filter in a User Group.

post/ng/api/user-groups/batch
Request samples
{
  • "databaseIdFilter": [
    ],
  • "identifierFilter": [
    ],
  • "userIdentifierFilter": [
    ],
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "searchTerm": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get a User Group in an account/org/project

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

groupIdentifier
required
string

groupIdentifier

Request Body schema:
Array
accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
Responses
400

Bad Request

500

Internal server error

default

Returns whether the copy was successful

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