Accessing and using the Role-Based Access Control Service API
Use the Role-Based Access Control Service API to manage the lifecycle of role-based access control policies from the command line.
About this task
Complete role-based access tasks such as creating, viewing, updating, and deleting roles. Add and delete a set of users or user groups from a specific role. Grant permissions to a specific role. View a list of roles, users, user groups, and permissions that are defined in the system.
You can create scripts for automating such tasks as defining new roles and assigning users, user groups, and permissions to these roles.
Procedure
Example
POST /1.0/authzn/roles
Note: The body of the POST
request must contain a JSON object that defines the role as shown by the -d
parameter.
curl -X POST \
https://api.ibm.com/perfmgmt/run/1.0/authzn/roles \
-H 'Referer: https://api.ibm.com' \
-H 'authorization: Basic REPLACE_BASE64_ENCODED_STRING' \
-H 'content-type: application/json' \
-H 'x-ibm-client-id: REPLACE_KEY_VALUE' \
-H 'x-ibm-client-secret: REPLACE_KEY_VALUE' \
-d '{
"description": "Your Role Description",
"id": "/authzn/roles/Your_Role_Id",
"label": "Your Role Name"
}'