Retrieves the information of the role assignments
Role Assignment List Response body
curl -i -X GET \ 'https://app.harness.io/v1/orgs/{org}/projects/{project}/role-assignments?page=0&limit=30&sort=identifier&order=ASC' \ -H 'Harness-Account: string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
[- {
- "role-assignment": {
- "identifier": "example_role_assignment",
- "resource_group": "example_resource_group_identifier",
- "role": "example_role_identifier",
- "principal": {
- "scope": "ACCOUNT",
- "identifier": "example_principal_identifier",
- "type": "USER"
}, - "disabled": false,
- "managed": false
}, - "created": 1234567890,
- "updated": 1234567890,
- "harness_managaed": false
}
]
Create a role assignment
Role Request body
Role assignment response body
{- "identifier": "example_role_assignment",
- "resource_group": "example_resource_group_identifier",
- "role": "example_role_identifier",
- "principal": {
- "scope": "ACCOUNT",
- "identifier": "example_principal_identifier",
- "type": "USER"
}, - "disabled": false,
- "managed": false
}
{- "role-assignment": {
- "identifier": "example_role_assignment",
- "resource_group": "example_resource_group_identifier",
- "role": "example_role_identifier",
- "principal": {
- "scope": "ACCOUNT",
- "identifier": "example_principal_identifier",
- "type": "USER"
}, - "disabled": false,
- "managed": false
}, - "created": 1234567890,
- "updated": 1234567890,
- "harness_managaed": false
}
Retrieves the information of the role assignment with the matching role assignment identifier.
Role assignment response body
curl -i -X GET \ 'https://app.harness.io/v1/orgs/{org}/projects/{project}/role-assignments/{role-assignment}' \ -H 'Harness-Account: string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "role-assignment": {
- "identifier": "example_role_assignment",
- "resource_group": "example_resource_group_identifier",
- "role": "example_role_identifier",
- "principal": {
- "scope": "ACCOUNT",
- "identifier": "example_principal_identifier",
- "type": "USER"
}, - "disabled": false,
- "managed": false
}, - "created": 1234567890,
- "updated": 1234567890,
- "harness_managaed": false
}
Deletes the information of the role assignment with the matching role assignment identifier.
Role assignment response body
curl -i -X DELETE \ 'https://app.harness.io/v1/orgs/{org}/projects/{project}/role-assignments/{role-assignment}' \ -H 'Harness-Account: string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "role-assignment": {
- "identifier": "example_role_assignment",
- "resource_group": "example_resource_group_identifier",
- "role": "example_role_identifier",
- "principal": {
- "scope": "ACCOUNT",
- "identifier": "example_principal_identifier",
- "type": "USER"
}, - "disabled": false,
- "managed": false
}, - "created": 1234567890,
- "updated": 1234567890,
- "harness_managaed": false
}