Role Assignments
This contains APIs for CRUD on role assignments
Bulk delete role assignments by identifiers
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Returns successfully/failed deleted roleassignment.
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 multiple role assignments in a scope. Returns all successfully created role assignments. Ignores failures and duplicates.
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Successfully created role assignments
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 in the given scope
Page Index of the results to fetch.Default Value: 0
0Results per page(min 1, max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Paginated list of role assignments in the given scope
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"
}
]
}Creates role assignment within the specified scope.
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Role Assignment to validate
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
These are details of the created role assignment.
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 an existing role assignment by identifier
Identifier for role assignment
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Get an existing role assignment by identifier in the given scope
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 an existing role assignment by identifier
Identifier for role assignment
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Deleted role assignment
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 in the scope according to the given filter
Page Index of the results to fetch.Default Value: 0
0Results per page(min 1, max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Filter role assignments based on resource group identifiers
Filter role assignments based on role identifiers
Filter role assignments based on principal scope level
Filter role assignments based on role assignments being harness managed
Filter role assignments based on whether they are enabled or disabled
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Paginated list of role assignments in the scope according to the given 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 role assignments in the scope according to the given filter with added metadata
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Filter role assignments based on resource group identifiers
Filter role assignments based on role identifiers
Filter role assignments based on principal scope level
Filter role assignments based on role assignments being harness managed
Filter role assignments based on whether they are enabled or disabled
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Paginated list of role assignments in the scope according to the given filter with added metadata.
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 in the scope according to the given filter
Page Index of the results to fetch.Default Value: 0
0Results per page(min 1, max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Filter role assignments based on resource group identifiers
Filter role assignments based on role identifiers
Filter role assignments based on role assignments being harness managed
Filter role assignments based on whether they are enabled or disabled
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Paginated list of role assignments in the scope according to the given 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"
}
]
}Check whether a proposed role assignment is valid.
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Set it to true if the principal needs to be validated
Set it to true if the role needs to be validated
Set it to true if the resource group needs to be validated
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
This is the result of the role assignment validation request.
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?