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

Roles

This contains APIs for CRUD on roles

List Roles

get

List roles 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.

searchTermstringOptional

Search roles by name/identifier

harnessManagedbooleanOptional

Filter role by being harness managed

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/roles
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 Role

post

Create a Custom Role in a 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
identifierstringRequired

Unique identifier of the role

namestringRequired

Name of the role

permissionsstring[]Optional

List of the permission identifiers (Subset of the list returned by GET /authz/api/permissions)

descriptionstringOptional

Description of the role

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/roles
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 Role

get

Get a Role by identifier

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

Identifier of the Role

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/roles/{identifier}
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 Role

put

Update a Custom Role by identifier

Path parameters
identifierstringRequired

Identifier of the Role

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
identifierstringRequired

Unique identifier of the role

namestringRequired

Name of the role

permissionsstring[]Optional

List of the permission identifiers (Subset of the list returned by GET /authz/api/permissions)

descriptionstringOptional

Description of the role

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
put/roles/{identifier}
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 Role

delete

Delete a Custom Role in a scope

Path parameters
identifierstringRequired

Identifier of the Role

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/roles/{identifier}
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?