User Group

This contains APIs related to User Group as defined in Harness

Add user to User Group

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

SecurityApiKey
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Check user membership

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

SecurityApiKey
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Copy User GroupDeprecated

Copy a User Group in an account/org/project

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

groupIdentifier
required
string

groupIdentifier

Request Body schema:

List of scopes

Array
accountIdentifier
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 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": [
    ]
}

Create User Group

Create a User Group in an account/org/project

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:

User Group entity to be created

accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
required
string

Identifier of the UserGroup.

name
required
string

Name of the UserGroup.

users
Array of strings

List of users in the UserGroup.

Array of objects (NotificationSettingConfigDTO)

List of notification settings.

isSsoLinked
boolean
linkedSsoId
string

Identifier of the linked SSO.

linkedSsoDisplayName
string

Name of the linked SSO.

ssoGroupId
string

Identifier of the userGroup in SSO.

ssoGroupName
string

Name of the SSO userGroup.

linkedSsoType
string

Type of linked SSO

externallyManaged
boolean

Specifies whether or not the userGroup is externally managed.

description
string [ 0 .. 1024 ] characters

Description of the entity

object

Tags

harnessManaged
boolean

Specifies whether or not the userGroup is managed by harness.

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",
  • "linkedSsoType": "string",
  • "externallyManaged": true,
  • "description": "string",
  • "tags": {
    },
  • "harnessManaged": true,
  • "ssoLinked": true
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a User Group in an account/org/project

Delete User Group

SecurityApiKey
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get Inheriting Child Scopes

List the Child Scopes inheriting this User Group

SecurityApiKey
Request
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 list of the child scopes inheriting this User Group.

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

Get User Group

Get a User Group in an account/org/project

SecurityApiKey
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Link LDAP Group to the User Group to an account/org/project

SecurityApiKey
Request
path Parameters
userGroupId
required
string

Identifier of the user group

ldapId
required
string

LDAP 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:

LDAP Link Group Request

ldapGroupDN
required
string
ldapGroupName
required
string
Responses
400

Bad Request

500

Internal server error

default

Returns the updated User Group after linking LDAP Group

put/ng/api/user-groups/{userGroupId}/link/ldap/{ldapId}
Request samples
{
  • "ldapGroupDN": "string",
  • "ldapGroupName": "string"
}
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

SecurityApiKey
Request
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
required
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 User Groups in an account/org/project

List User Groups

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 filter which matches by user group name/identifier

filterType
string
Default: "EXCLUDE_INHERITED_GROUPS"
Enum: "INCLUDE_INHERITED_GROUPS" "EXCLUDE_INHERITED_GROUPS"
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.

Responses
400

Bad Request

500

Internal server error

default

Returns the paginated list of the User Groups.

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

List User Groups by filter

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

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

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

filterType
string

Filter by user group filterType

Enum: "INCLUDE_INHERITED_GROUPS" "EXCLUDE_INHERITED_GROUPS"
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",
  • "filterType": "INCLUDE_INHERITED_GROUPS"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List users in User Group

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

SecurityApiKey
Request
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

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:

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": [
    ]
}

Remove user from User Group

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

SecurityApiKey
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

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

SecurityApiKey
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update User Group

Update a User Group in an account/org/project

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:

User Group entity with the updates

accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
required
string

Identifier of the UserGroup.

name
required
string

Name of the UserGroup.

users
Array of strings

List of users in the UserGroup.

Array of objects (NotificationSettingConfigDTO)

List of notification settings.

isSsoLinked
boolean
linkedSsoId
string

Identifier of the linked SSO.

linkedSsoDisplayName
string

Name of the linked SSO.

ssoGroupId
string

Identifier of the userGroup in SSO.

ssoGroupName
string

Name of the SSO userGroup.

linkedSsoType
string

Type of linked SSO

externallyManaged
boolean

Specifies whether or not the userGroup is externally managed.

description
string [ 0 .. 1024 ] characters

Description of the entity

object

Tags

harnessManaged
boolean

Specifies whether or not the userGroup is managed by harness.

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",
  • "linkedSsoType": "string",
  • "externallyManaged": true,
  • "description": "string",
  • "tags": {
    },
  • "harnessManaged": true,
  • "ssoLinked": true
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}