Roles Resource


Roles Resource offers the functionality of managing the platform roles in a logical way.
Main URI of the Resource
This class operates mainly over the Resource URI: /admin/roles
Exposed Methods
Retrieve Roles
Return all roles of an enterprise.
Synopsis: GET http://example.com/api/admin/roles
Roles Required: ROLE_AUTHENTICATED,ROLE_USERS_MANAGE_ROLES,ROLE_USERS_VIEW_PRIVILEGES,ROLE_USERS_VIEW
Request Headers: Accept:
application/vnd.abiquo.roles+json; version=3.0; application/vnd.abiquo.roles+xml; version=3.0; Content-type: ;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
identerprise | false | | identifier of the enterprise |
startwith | false | 0 | first element to retrieve |
by | false | name | ordering the request. |
has | false | | filter the request. With this parameter the response just contains the elements which name matches the filter value. |
limit | false | 25 | number of elements to return |
asc | false | true | order ascendant or descendant. By default the sort mode is ascending. |
| | | |
Request Message Body Entity:
Response Message Body Entity: Roles Media Type
Request Example:
Click here to show or hide the request example
$ curl -X GET http://10.60.20.60/api/admin/roles?identerprise=2\
-H 'Accept: application/vnd.abiquo.roles+xml; version=2.4' \
-u user:password --verbose
GET http://10.60.20.60/api/admin/roles?identerprise=2 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.roles+xml;version=2.4
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:25 GMT
Set-Cookie: JSESSIONID=A100ABD552C7376A841704DC75AFF240; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIyNTc5Njo1Y2I3MzExODBkNDY4MjQwZTNkMTA4ZTA2N2VhM2JkNzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:25 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.roles+xml;version=2.4
Content-Length: 2969
<?xml version="1.0" encoding="UTF-8"?>
<roles>
<link href="http://10.60.20.60:80/api/admin/roles" rel="first"/>
<link href="http://10.60.20.60:80/api/admin/roles?startwith=0" rel="last"/>
<totalSize>6</totalSize>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/1" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link
href="http://10.60.20.60:80/api/admin/roles/1/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>true</blocked>
<id>1</id>
<name>CLOUD_ADMIN</name>
</role>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/2" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link
href="http://10.60.20.60:80/api/admin/roles/2/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>2</id>
<name>USER</name>
</role>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/3" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link
href="http://10.60.20.60:80/api/admin/roles/3/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>3</id>
<name>ENTERPRISE_ADMIN</name>
</role>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/4" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link
href="http://10.60.20.60:80/api/admin/roles/4/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>4</id>
<name>JC-b119a4eb-444</name>
</role>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/5" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link
href="http://10.60.20.60:80/api/admin/roles/5/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>5</id>
<name>Another role</name>
</role>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/6" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link href="http://10.60.20.60:80/api/admin/enterprises/2"
rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/>
<link
href="http://10.60.20.60:80/api/admin/roles/6/action/privileges"
rel="privileges" type="application/vnd.abiquo.role+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>6</id>
<idEnterprise>2</idEnterprise>
<name>JC-b119a4eb-444enterprise</name>
</role>
</roles>
Create Role
Create a new role.
Synopsis: POST http://example.com/api/admin/roles
Roles Required: ROLE_USERS_MANAGE_ROLES
Request Headers: Accept:
application/vnd.abiquo.role+json; version=3.0; application/vnd.abiquo.role+xml; version=3.0; Content-type:
application/vnd.abiquo.role+json; version=3.0; application/vnd.abiquo.role+xml; version=3.0;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity: Role Media Type
Response Message Body Entity: Role Media Type
Request Example:
Click here to show or hide the request example
$ curl -X POST http://10.60.20.60/api/admin/roles\
-H 'Accept: application/vnd.abiquo.role+xml; version=2.4' \
-H 'Content-Type: application/vnd.abiquo.role+xml; version=2.4' \
-d @entity.xml \
-u user:password --verbose
POST http://10.60.20.60/api/admin/roles HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.role+xml;version=2.4
Content-Type: application/vnd.abiquo.role+xml;version=2.4
Content-Length: 225
HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:10:25 GMT
Location: http://10.60.20.60:80/api/admin/roles/6
Set-Cookie: JSESSIONID=4A6D13337687FE11FE46EB2F214D5189; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIyNTc1MDphZjNlZjNlOTM0YzQ5ZTI1Mzg3OWU5MTRmZDM4NGE1NjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:25 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.role+xml;version=2.4
Content-Length: 644
<?xml version="1.0" encoding="UTF-8"?>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/6" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link href="http://10.60.20.60:80/api/admin/enterprises/2"
rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/>
<link href="http://10.60.20.60:80/api/admin/roles/6/action/privileges"
rel="privileges" type="application/vnd.abiquo.role+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>6</id>
<idEnterprise>2</idEnterprise>
<name>JC-b119a4eb-444enterprise</name>
</role>
Create Ldap Role
Create a new role associated to roleldap.
Synopsis: POST http://example.com/api/admin/roles
Roles Required: ROLE_USERS_MANAGE_ROLES
Request Headers: Accept:
application/vnd.abiquo.rolewithldap+json; version=3.0; application/vnd.abiquo.rolewithldap+xml; version=3.0; Content-type:
application/vnd.abiquo.rolewithldap+json; version=3.0; application/vnd.abiquo.rolewithldap+xml; version=3.0;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity: RoleWithLdap Media Type
Response Message Body Entity: RoleWithLdap Media Type
Request Example:
Click here to show or hide the request example
curl --verbose -X POST 'http://example.com/api/admin/roles' \
-H "Accept: application/vnd.abiquo.rolewithldap+xml;version=2.0" \
-H "Content-Type: application/vnd.abiquo.rolewithldap+xml;version=2.0" \
-u user:password
-d
<roleWithLdap>
<blocked>false</blocked>
<id>5</id>
<idEnterprise>1</idEnterprise>
<ldap>ldap</ldap>
<name>rolename</name>
<idLdap>0</idLdap>
</roleWithLdap>
< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM0NjQyNTM0MzExMzpjMTEyODk1NjIwNzU0ZTcwY2YwMDQ4YTU2MmZiYmFjODpBQklRVU8; Expires=Fri, 31-Aug-2012 15:02:23 GMT; Path=/api
< Location: http://example.com:80/api/admin/roles/6
< Set-Cookie: JSESSIONID=3A313DFAC49730DF1E21970539E6D8EB; Path=/api
< Content-Type: application/vnd.abiquo.rolewithldap+xml;version=2.0
< Content-Length: 535
< Date: Fri, 31 Aug 2012 14:32:23 GMT
<
{ [data not shown]
100 684 100 535 100 149 857 238 --:--:-- --:--:-- --:--:-- 860
* Connection #0 to host example.com left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<roleWithLdap>
<link rel="edit" type="application/vnd.abiquo.role+xml" href="http://example.com:80/api/admin/roles/6"/>
<link rel="privileges" type="application/vnd.abiquo.privileges+xml" href="http://example.com:80/api/admin/roles/6/action/privileges"/>
<link rel="scope" type="application/vnd.abiquo.scope+xml; version=2.2" href="http://example.com:80/api/admin/scopes/1"/>
<blocked>false</blocked>
<id>6</id>
<ldap>ldap</ldap>
<name>rolename</name>
<idLdap>1</idLdap>
</roleWithLdap>
Retrieve a single Role
Gets information of an existing role.
Synopsis: GET http://example.com/api/admin/roles/{role}
Roles Required: ROLE_AUTHENTICATED,ROLE_USERS_MANAGE_ROLES,ROLE_USERS_VIEW
Request Headers: Accept:
application/vnd.abiquo.role+json; version=3.0; application/vnd.abiquo.role+xml; version=3.0; Content-type: ;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity:
Response Message Body Entity: Role Media Type
Request Example:
Click here to show or hide the request example
$ curl -X GET http://10.60.20.60:80/api/admin/roles/3\
-H 'Accept: application/vnd.abiquo.role+xml; version=2.4' \
-u user:password --verbose
GET http://10.60.20.60:80/api/admin/roles/3 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.role+xml;version=2.4
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:06:06 GMT
Set-Cookie: JSESSIONID=FE65F59620D4538D902B898C15291EED; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0Njk2NzAxNjo2YjI5MGI3YTQyMDVhOTM2MjQyODM0ZmViNmI3NDc5ZDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:36:07 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.role+xml;version=2.4
Content-Length: 489
<?xml version="1.0" encoding="UTF-8"?>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/3" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link href="http://10.60.20.60:80/api/admin/roles/3/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>3</id>
<name>ENTERPRISE_ADMIN</name>
</role>
Retrieve a list of links to Privileges from a Role
Retrieves the list of links to Privileges associated with a role.
Synopsis: GET http://example.com/api/admin/roles/{role}/action/privileges
Roles Required: ROLE_AUTHENTICATED,ROLE_USERS_VIEW_PRIVILEGES,ROLE_USERS_VIEW
Request Headers: Accept:
application/vnd.abiquo.links+json; version=3.0; application/vnd.abiquo.links+xml; version=3.0; Content-type: ;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity:
Response Message Body Entity: Links Media Type
Request Example:
Click here to show or hide the request example
$ curl -X GET http://10.60.20.60:80/api/admin/roles/4/action/privileges\
-H 'Accept: application/vnd.abiquo.links+xml; version=2.6' \
-u user:password --verbose
GET http://10.60.20.60:80/api/admin/roles/4/action/privileges HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.links+xml; version=2.6
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:25 GMT
Set-Cookie: JSESSIONID=299E3D6410C8E10561D1B005CBBE58E6; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIyNTU4NTphMzY3NTI2YjEyM2RiMDlmYzIzNGMwNGViOGFhMzNiZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:25 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.links+xml; version=2.6
Content-Length: 68
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<links>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/12"/>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/30"/>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/17"/>
</links>
Retrieve a list of Privileges from a Role
Retrieves the list of Privileges associated with a role.
Synopsis: GET http://example.com/api/admin/roles/{role}/action/privileges
Roles Required: ROLE_AUTHENTICATED,ROLE_USERS_VIEW_PRIVILEGES,ROLE_USERS_VIEW
Request Headers: Accept:
application/vnd.abiquo.privileges+json; version=3.0; application/vnd.abiquo.privileges+xml; version=3.0; Content-type: ;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity:
Response Message Body Entity: Privileges Media Type
Request Example:
Click here to show or hide the request example
$ curl -X GET http://10.60.20.60:80/api/admin/roles/4/action/privileges\
-H 'Accept: application/vnd.abiquo.privileges+xml; version=2.6' \
-u user:password --verbose
GET http://10.60.20.60:80/api/admin/roles/4/action/privileges HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.privileges+xml;version=2.6
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:25 GMT
Set-Cookie: JSESSIONID=299E3D6410C8E10561D1B005CBBE58E6; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIyNTU4NTphMzY3NTI2YjEyM2RiMDlmYzIzNGMwNGViOGFhMzNiZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:25 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.privileges+xml;version=2.6
Content-Length: 68
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<privileges>
<privilege>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/12"/>
<id>12</id>
<name>VDC_ENUMERATE</name>
</privilege>
<privilege>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/30"/>
<id>30</id>
<name>USERS_VIEW</name>
</privilege>
<privilege>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/17"/>
<id>17</id>
<name>VAPP_CUSTOMISE_SETTINGS</name>
</privilege>
</privileges>
Retrieve information about an existing role ldap
Synopsis: GET http://example.com/api/admin/roles/{role}
Roles Required: ROLE_AUTHENTICATED,ROLE_USERS_MANAGE_ROLES,ROLE_USERS_VIEW
Request Headers: Accept:
application/vnd.abiquo.rolewithldap+json; version=3.0; application/vnd.abiquo.rolewithldap+xml; version=3.0; Content-type: ;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity:
Response Message Body Entity: RoleWithLdap Media Type
Request Example:
Click here to show or hide the request example
$ curl -X GET http://10.60.20.60:80/api/admin/roles/3\
-H 'Accept: application/vnd.abiquo.role+xml; version=2.4' \
-u user:password --verbose
GET http://10.60.20.60:80/api/admin/roles/3 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.role+xml;version=2.4
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:06:06 GMT
Set-Cookie: JSESSIONID=FE65F59620D4538D902B898C15291EED; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0Njk2NzAxNjo2YjI5MGI3YTQyMDVhOTM2MjQyODM0ZmViNmI3NDc5ZDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:36:07 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.role+xml;version=2.4
Content-Length: 489
<?xml version="1.0" encoding="UTF-8"?>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/3" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link href="http://10.60.20.60:80/api/admin/roles/3/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>3</id>
<name>ENTERPRISE_ADMIN</name>
</role>
Update information about an existing role.
The privileges currently assigned to the role will be replaced by the privileges supplied in the xml. Therefore, an empty xml will result in a role with no privileges.
Synopsis: PUT http://example.com/api/admin/roles/{role}
Roles Required: ROLE_USERS_MANAGE_ROLES
Request Headers: Accept:
application/vnd.abiquo.role+json; version=3.0; application/vnd.abiquo.role+xml; version=3.0; Content-type:
application/vnd.abiquo.role+json; version=3.0; application/vnd.abiquo.role+xml; version=3.0;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity: Role Media Type
Response Message Body Entity: Role Media Type
Request Example:
Click here to show or hide the request example
$ curl -X PUT http://10.60.20.60:80/api/admin/roles/4\
-H 'Accept: application/vnd.abiquo.role+xml; version=2.6' \
-H 'Content-Type: application/vnd.abiquo.role+xml; version=2.6' \
-d @entity.xml \
-u user:password --verbose
PUT http://10.60.20.60:80/api/admin/roles/4 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.role+xml;version=2.4
Content-Type: application/vnd.abiquo.role+xml;version=2.4
Content-Length: 603
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:25 GMT
Set-Cookie: JSESSIONID=3B46AEC13C4DB27F178D2278A6F66567; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIyNTYxNTowOTM1NzM5Nzk0MTdhOGI4MmQyZmMyMjI2ZGEyY2I1NjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:25 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.role+xml;version=2.6
Content-Length: 488
<?xml version="1.0" encoding="UTF-8"?>
<role>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/12"/>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/30"/>
<link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://localhost:80/api/config/privileges/17"/>
<blocked>false</blocked>
<id>4</id>
<name>JC-b119a4eb-444</name>
</role>
Update information about an existing role ldap.
The privileges currently assigned to the role will be replaced by the privileges supplied in the xml. Therefore, an empty xml will result in a role with no privileges.
Synopsis: PUT http://example.com/api/admin/roles/{role}
Roles Required: ROLE_USERS_MANAGE_ROLES
Request Headers: Accept:
application/vnd.abiquo.rolewithldap+json; version=3.0; application/vnd.abiquo.rolewithldap+xml; version=3.0; Content-type:
application/vnd.abiquo.rolewithldap+json; version=3.0; application/vnd.abiquo.rolewithldap+xml; version=3.0;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity: RoleWithLdap Media Type
Response Message Body Entity: RoleWithLdap Media Type
Request Example:
Click here to show or hide the request example
$ curl -X PUT http://10.60.20.60:80/api/admin/roles/4\
-H 'Accept: application/vnd.abiquo.role+xml; version=2.4' \
-H 'Content-Type: application/vnd.abiquo.role+xml; version=2.4' \
-d @entity.xml \
-u user:password --verbose
PUT http://10.60.20.60:80/api/admin/roles/4 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.role+xml;version=2.4
Content-Type: application/vnd.abiquo.role+xml;version=2.4
Content-Length: 603
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:25 GMT
Set-Cookie: JSESSIONID=3B46AEC13C4DB27F178D2278A6F66567; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIyNTYxNTowOTM1NzM5Nzk0MTdhOGI4MmQyZmMyMjI2ZGEyY2I1NjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:25 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.role+xml;version=2.4
Content-Length: 488
<?xml version="1.0" encoding="UTF-8"?>
<role>
<link href="http://10.60.20.60:80/api/admin/roles/4" rel="edit" type="application/vnd.abiquo.role+xml"/>
<link href="http://10.60.20.60:80/api/admin/roles/4/action/privileges"
rel="privileges" type="application/vnd.abiquo.privileges+xml"/>
<link href="http://10.60.20.60:80/api/admin/scopes/1" rel="scope" type="application/vnd.abiquo.scope+xml; version=2.4"/>
<blocked>false</blocked>
<id>4</id>
<name>JC-b119a4eb-444</name>
</role>
Delete information about an existing role
Synopsis: DELETE http://example.com/api/admin/roles/{role}
Roles Required: ROLE_USERS_MANAGE_ROLES
Request Headers: Accept: ; Content-type: ;
Request Parameters:
Parameter | Required | Default Value | Description |
---|
| | | |
Request Message Body Entity:
Response Message Body Entity:
Request Example:
Click here to show or hide the request example
$ curl -X DELETE http://10.60.20.60:80/api/admin/roles/5\
-u user:password --verbose
DELETE http://10.60.20.60:80/api/admin/roles/5 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:11:24 GMT
Set-Cookie: JSESSIONID=C1E38A68520DD78115E23B9118730D0B; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzI4MzkwMjpmOGRlYzI3NmE5OTY4YWU2MDVlNmM4ODAxMTllODc0ODpBQklRVU8; Expires=Wed, 16-Jan-2013 14:41:23 GMT; Path=/api
Server: Apache-Coyote/1.1