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

Role Assignments

This contains APIs for CRUD on role assignments

Bulk Delete Role Assignment

post

Bulk delete role assignments by identifiers

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

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Bodystring[]
string[] · max: 100Optional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roleassignments/delete/batch
POST /gateway/authz/api/roleassignments/delete/batch?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Content-Type: application/json
Accept: */*
Content-Length: 8

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

Create Role Assignments

post

Create multiple role assignments in a scope. Returns all successfully created role assignments. Ignores failures and duplicates.

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

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roleassignments/multi
POST /gateway/authz/api/roleassignments/multi?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Content-Type: application/json
Accept: */*
Content-Length: 291

{
  "roleAssignments": [
    {
      "identifier": "text",
      "resourceGroupIdentifier": "text",
      "roleIdentifier": "text",
      "roleReference": {
        "identifier": "text",
        "scopeLevel": "text"
      },
      "principal": {
        "scopeLevel": "text",
        "identifier": "text",
        "type": "USER",
        "uniqueId": "text"
      },
      "disabled": true,
      "managed": true,
      "internal": true
    }
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

List Role Assignments

get

List role assignments in the given scope

Query parameters
pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · min: 1 · max: 100Optional

Results per page(min 1, max 100)Default Value: 50

Default: 50
pageTokenstringOptional

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

accountIdentifierstring · min: 1 · max: 2147483647Required

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/roleassignments
GET /gateway/authz/api/roleassignments?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Create Role Assignment

post

Creates role assignment within the specified 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.

Body

Role Assignment to validate

identifierstringOptional
resourceGroupIdentifierstring · min: 1Required
roleIdentifierstring · min: 1Required
disabledbooleanOptional
managedbooleanOptional
internalbooleanOptional
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roleassignments
POST /gateway/authz/api/roleassignments?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Content-Type: application/json
Accept: */*
Content-Length: 269

{
  "identifier": "text",
  "resourceGroupIdentifier": "text",
  "roleIdentifier": "text",
  "roleReference": {
    "identifier": "text",
    "scopeLevel": "text"
  },
  "principal": {
    "scopeLevel": "text",
    "identifier": "text",
    "type": "USER",
    "uniqueId": "text"
  },
  "disabled": true,
  "managed": true,
  "internal": true
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Get Role Assignment

get

Get an existing role assignment by identifier

Path parameters
identifierstring · min: 1 · max: 2147483647Required

Identifier for role assignment

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

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/roleassignments/{identifier}
GET /gateway/authz/api/roleassignments/{identifier}?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Delete Role Assignment

delete

Delete an existing role assignment by identifier

Path parameters
identifierstring · min: 1 · max: 2147483647Required

Identifier for role assignment

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

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/roleassignments/{identifier}
DELETE /gateway/authz/api/roleassignments/{identifier}?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

List Role Assignments by filter

post

List role assignments in the scope according to the given filter

Query parameters
pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · min: 1 · max: 100Optional

Results per page(min 1, max 100)Default Value: 50

Default: 50
pageTokenstringOptional

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

accountIdentifierstring · min: 1 · max: 2147483647Required

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
resourceGroupFilterstring[]Optional

Filter role assignments based on resource group identifiers

roleFilterstring[]Optional

Filter role assignments based on role identifiers

principalScopeLevelFilterstring[]Optional

Filter role assignments based on principal scope level

harnessManagedFilterboolean[]Optional

Filter role assignments based on role assignments being harness managed

disabledFilterboolean[]Optional

Filter role assignments based on whether they are enabled or disabled

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roleassignments/filter
POST /gateway/authz/api/roleassignments/filter?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Content-Type: application/json
Accept: */*
Content-Length: 336

{
  "resourceGroupFilter": [
    "text"
  ],
  "roleFilter": [
    "text"
  ],
  "roleReferenceFilter": [
    {
      "identifier": "text",
      "scopeLevel": "text"
    }
  ],
  "principalTypeFilter": [
    "USER"
  ],
  "principalScopeLevelFilter": [
    "text"
  ],
  "principalFilter": [
    {
      "scopeLevel": "text",
      "identifier": "text",
      "type": "USER",
      "uniqueId": "text"
    }
  ],
  "harnessManagedFilter": [
    true
  ],
  "disabledFilter": [
    true
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

List Aggregated Role Assignments by filter

post

List role assignments in the scope according to the given filter with added metadata

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

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
resourceGroupFilterstring[]Optional

Filter role assignments based on resource group identifiers

roleFilterstring[]Optional

Filter role assignments based on role identifiers

principalScopeLevelFilterstring[]Optional

Filter role assignments based on principal scope level

harnessManagedFilterboolean[]Optional

Filter role assignments based on role assignments being harness managed

disabledFilterboolean[]Optional

Filter role assignments based on whether they are enabled or disabled

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roleassignments/aggregate
POST /gateway/authz/api/roleassignments/aggregate?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Content-Type: application/json
Accept: */*
Content-Length: 336

{
  "resourceGroupFilter": [
    "text"
  ],
  "roleFilter": [
    "text"
  ],
  "roleReferenceFilter": [
    {
      "identifier": "text",
      "scopeLevel": "text"
    }
  ],
  "principalTypeFilter": [
    "USER"
  ],
  "principalScopeLevelFilter": [
    "text"
  ],
  "principalFilter": [
    {
      "scopeLevel": "text",
      "identifier": "text",
      "type": "USER",
      "uniqueId": "text"
    }
  ],
  "harnessManagedFilter": [
    true
  ],
  "disabledFilter": [
    true
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

List Role Assignments by scope filter

post

List role assignments in the scope according to the given filter

Query parameters
pageIndexinteger · int32Optional

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

Default: 0
pageSizeinteger · int32 · min: 1 · max: 100Optional

Results per page(min 1, max 100)Default Value: 50

Default: 50
pageTokenstringOptional

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

accountIdentifierstring · min: 1 · max: 2147483647Required

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
resourceGroupFilterstring[]Optional

Filter role assignments based on resource group identifiers

roleFilterstring[]Optional

Filter role assignments based on role identifiers

harnessManagedFilterbooleanOptional

Filter role assignments based on role assignments being harness managed

disabledFilterbooleanOptional

Filter role assignments based on whether they are enabled or disabled

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roleassignments/v2/filter
POST /gateway/authz/api/roleassignments/v2/filter?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Content-Type: application/json
Accept: */*
Content-Length: 423

{
  "resourceGroupFilter": [
    "text"
  ],
  "roleFilter": [
    "text"
  ],
  "roleReferenceFilter": [
    {
      "identifier": "text",
      "scopeLevel": "text"
    }
  ],
  "scopeFilters": [
    {
      "filter": "EXCLUDING_CHILD_SCOPES",
      "accountIdentifier": "text",
      "orgIdentifier": "text",
      "projectIdentifier": "text"
    }
  ],
  "principalFilter": {
    "scopeLevel": "text",
    "identifier": "text",
    "type": "USER",
    "uniqueId": "text"
  },
  "harnessManagedFilter": true,
  "disabledFilter": true,
  "principalTypeFilter": [
    "USER"
  ]
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Validate Role Assignment

post

Check whether a proposed role assignment is valid.

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

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
validatePrincipalbooleanOptional

Set it to true if the principal needs to be validated

validateRolebooleanOptional

Set it to true if the role needs to be validated

validateResourceGroupbooleanOptional

Set it to true if the resource group needs to be validated

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roleassignments/validate
POST /gateway/authz/api/roleassignments/validate?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-ltplk
Content-Type: application/json
Accept: */*
Content-Length: 362

{
  "roleAssignment": {
    "identifier": "text",
    "resourceGroupIdentifier": "text",
    "roleIdentifier": "text",
    "roleReference": {
      "identifier": "text",
      "scopeLevel": "text"
    },
    "principal": {
      "scopeLevel": "text",
      "identifier": "text",
      "type": "USER",
      "uniqueId": "text"
    },
    "disabled": true,
    "managed": true,
    "internal": true
  },
  "validatePrincipal": true,
  "validateRole": true,
  "validateResourceGroup": true
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?