Roles
This contains APIs for CRUD on roles
List roles 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.
Search roles by name/identifier
Filter role by being harness managed
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Paginated list of roles in the given scope
GET /gateway/authz/api/roles?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-4bcz6
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Create a Custom Role in a scope
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Unique identifier of the role
Name of the role
List of the permission identifiers (Subset of the list returned by GET /authz/api/permissions)
Description of the role
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Created Role
POST /gateway/authz/api/roles?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-4bcz6
Content-Type: application/json
Accept: */*
Content-Length: 154
{
"identifier": "text",
"name": "text",
"permissions": [
"text"
],
"allowedScopeLevels": [
"account"
],
"description": "text",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Get a Role by identifier
Identifier of the Role
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
Queried Role
GET /gateway/authz/api/roles/{identifier}?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-4bcz6
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Update a Custom Role by identifier
Identifier of the Role
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Unique identifier of the role
Name of the role
List of the permission identifiers (Subset of the list returned by GET /authz/api/permissions)
Description of the role
Bad Request
This is Failure entity as defied in Harness
Unauthorized
Internal server error
Updated Role
PUT /gateway/authz/api/roles/{identifier}?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-4bcz6
Content-Type: application/json
Accept: */*
Content-Length: 154
{
"identifier": "text",
"name": "text",
"permissions": [
"text"
],
"allowedScopeLevels": [
"account"
],
"description": "text",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Delete a Custom Role in a scope
Identifier of the Role
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
DELETE /gateway/authz/api/roles/{identifier}?accountIdentifier=text HTTP/1.1
Host: access-control-79894d6ccb-4bcz6
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Last updated
Was this helpful?