Roles

This contains APIs for CRUD on roles

List Roles

List roles in the given scope

Securityx-api-key
Request
query Parameters
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.

pageToken
string

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

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 roles by name/identifier

harnessManaged
boolean

Filter role by being harness managed

Responses
400

Bad Request

403

Unauthorized

500

Internal server error

default

Paginated list of roles in the given scope

get/authz/api/roles
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create Role

Create a Custom Role in a scope

Securityx-api-key
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:
required

Role entity

identifier
required
string

Unique identifier of the role

name
required
string

Name of the role

permissions
Array of strings unique

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

allowedScopeLevels
Array of strings unique

The scope levels at which this role can be used

Items Enum: "account" "organization" "project"
description
string

Description of the role

object

Tags

Responses
400

Bad Request

403

Unauthorized

500

Internal server error

default

Created Role

post/authz/api/roles
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "permissions": [
    ],
  • "allowedScopeLevels": [
    ],
  • "description": "string",
  • "tags": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get Role

Get a Role by identifier

Securityx-api-key
Request
path Parameters
identifier
required
string

Identifier of the Role

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

403

Unauthorized

500

Internal server error

default

Queried Role

get/authz/api/roles/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update Role

Update a Custom Role by identifier

Securityx-api-key
Request
path Parameters
identifier
required
string

Identifier of the Role

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

Updated Role entity

identifier
required
string

Unique identifier of the role

name
required
string

Name of the role

permissions
Array of strings unique

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

allowedScopeLevels
Array of strings unique

The scope levels at which this role can be used

Items Enum: "account" "organization" "project"
description
string

Description of the role

object

Tags

Responses
400

Bad Request

403

Unauthorized

500

Internal server error

default

Updated Role

put/authz/api/roles/{identifier}
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "permissions": [
    ],
  • "allowedScopeLevels": [
    ],
  • "description": "string",
  • "tags": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete Role

Delete a Custom Role in a scope

Securityx-api-key
Request
path Parameters
identifier
required
string

Identifier of the Role

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

403

Unauthorized

500

Internal server error

default

Deleted Role

delete/authz/api/roles/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}