Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Privileges Resource

Exposed Resources Hierarchy
Privileges Resource

Contents:

The Privilege resource is used to manage permissions. This page describes the method exposed to retrieve the privileges.

Main URI of the Resource

This class operates mainly over the Resource URI: /config/privileges

Exposed Methods

Retrieve all privileges

Returns all privileges from Abiquo.

Synopsis: GET http://example.com/api/config/privileges
Roles Required: ROLE_SYSCONFIG_VIEW,ROLE_USERS_VIEW
Request Headers: Accept: application/vnd.abiquo.privileges+xml; version=2.4; 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
Retrieve all privileges example
curl --verbose -u user:password http://example.com/api/config/privileges -H "accept:application/vnd.abiquo.privileges+xml;version=2.4" -X GET

> GET /api/config/privileges HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.privileges+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTczNzM4MjU2MDowZGQ4MmY4NTQ3MTk5MjBiOTgwMTZhNDBlYmM3OGQwMTpBQklRVU8; Expires=Fri, 01-Feb-2013 16:49:42 GMT; Path=/api
< Content-Type: application/vnd.abiquo.privileges+xml;version=2.4
< Transfer-Encoding: chunked
< Date: Fri, 01 Feb 2013 16:19:42 GMT

<privileges>
    <privilege>
        <link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://example.com/api/config/privileges/1"/>
        <id>1</id>
        <name>ENTERPRISE_ENUMERATE</name>
    </privilege>
    <privilege>
         <link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://example.com/api/config/privileges/2"/>
         <id>2</id>
         <name>ENTERPRISE_ADMINISTER_ALL</name>
      </privilege>
    <privilege>
        <link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://example.com/api/config/privileges/3"/>
	<id>3</id>
        <name>ENTERPRISE_RESOURCE_SUMMARY_ENT</name>
    </privilege>
    <privilege>
        <link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://example.com/api/config/privileges/4"/>
        <id>4</id>
        <name>PHYS_DC_ENUMERATE</name>
    </privilege>
    <privilege>
        <link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://example.com/api/config/privileges/5"/>
        <id>5</id>
        <name>PHYS_DC_RETRIEVE_RESOURCE_USAGE</name>
    </privilege>
    <privilege>
        <link rel="privilege" type="application/vnd.abiquo.privilege+xml" href="http://example.com/api/config/privileges/6"/>
        <id>6</id>
        <name>PHYS_DC_MANAGE</name>
    </privilege>
	.
	.
	.
</privileges>

Retrieve a privilege

Returns a specific privilege.

Synopsis: GET http://example.com/api/config/privileges/{privilege}
Roles Required: ROLE_AUTHENTICATED,ROLE_USERS_VIEW_PRIVILEGES,ROLE_USERS_VIEW
Request Headers: Accept: application/vnd.abiquo.privilege+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Privilege Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a privilege example
curl --verbose -u user:password http://example.com/api/config/privileges/15 -H "accept:application/vnd.abiquo.privilege+xml;version=2.4" -X GET

> GET /api/config/privileges/15 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.privilege+xml;version=2.4
 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTczNzgxNTY0MDo4Yzc4YTFjMjIwMDI3Nzg1MjFhNDE4YzRkMWM2MjgxMzpBQklRVU8; Expires=Fri, 01-Feb-2013 16:56:55 GMT; Path=/api
< Set-Cookie: JSESSIONID=57C5335CACE952F94A0B1749BFF9D8E6; Path=/api
< Content-Type: application/vnd.abiquo.privilege+xml;version=2.4
< Content-Length: 234
< Date: Fri, 01 Feb 2013 16:26:55 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<privilege>
    <link rel="self" type="application/vnd.abiquo.privilege+xml" href="http://example.com/api/config/privileges/15"/>
    <id>15</id>
    <name>VDC_MANAGE_NETWORK</name>
</privilege>