Add Role

 
MethodURIDescription
POST/v2.0/OS-KSADM/roles

Adds a role.

Normal response codes: 201

Error response codes: identityFault (400, 500, ), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), badMediaType (415), itemNotFound (404)

 Request

This table shows the header parameters for the add role request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token for an administrative user.

 

Example 4.17. Add Role: XML request

<?xml version="1.0" encoding="UTF-8"?>

<role xmlns="http://docs.openstack.org/identity/api/v2.0"
  id="123" name="Admin" description="All Access" />

 

Example 4.18. Add Role: JSON request

{
  "role": {
    "id": "123",
    "name": "Guest",
    "description": "Guest Access"
  }
}

 Response

This table shows the header parameters for the add role response:

NameTypeDescription

Location

​Any​U​RI

(Optional)

The location.

 

Example 4.19. Add Role: XML response

<?xml version="1.0" encoding="UTF-8"?>

<role xmlns="http://docs.openstack.org/identity/api/v2.0"
  id="123" name="Admin" description="All Access" />

 

Example 4.20. Add Role: JSON response

{
  "role": {
    "id": "123",
    "name": "Guest",
    "description": "Guest Access"
  }
}

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...