Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Credentials resource

Exposed Resources Hierarchy
Credentials

Contents:

This resource is used to manage the credentials of the public datacenters added to the platform. You can allow an enterprise to use a public datacenter by attaching credentials in this resource. 

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/enterprises/{enterprise}/limits/{limit}/credentials

Exposed Methods

Retrieve credentials for limit

Retrieve the credentials of limits of a Datacenter given its identifier.

Synopsis: GET  http://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/credentials
Roles Required: ROLE_PHYS_DC_MANAGE
Request Headers: Accept: application/vnd.abiquo.limits+xml; version=2.6 ;
Request Parameters:

Parameter

Required

Default Value

Description

    

 

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

 Click here to show or hide the request example
Retrieve limits by datacenter example
curl -X GET http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials\
	 -H 'Accept: application/vnd.abiquo.credentials+xml; version=2.6'	\
	 -u user:password --verbose


GET http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials  HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.credentials+xml;version=2.6


HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:07 GMT
Set-Cookie: JSESSIONID=B43A8F690911D3B0A27E1CA0BBFFD8BF; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwNzI2ODpiZTExMjYwZDZmM2U3YTY0ZjE3NGVkNTE4NDFlNmZlNTpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:07 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.credentials+xml;version=2.6
Content-Length: 4014

<credentialslist>
    <credentials>
        <link rel="edit" type="application/vnd.abiquo.credentials+xml" href="http://example.com/api/admin/enterprises/1/limits/2/credentials/2"/>
        <link rel="machine" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/2/racks/2/machines/2"/>
        <access>XXXXXXXXXXXXXXXXXX</access>
        <id>2</id>
        <key>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</key>
    </credentials>
</credentialslist>



Attach credentials

Allow an enterprise to use a public datacenter.

Synopsis: POST http://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/credentials/{limit}/credentials 
Roles Required: ROLE_PHYS_DC_MANAGE
Request Headers: Accept: application/vnd.abiquo.credentials+xml; version=2.6; Content-type: application/vnd.abiquo.credentials+xml; version=2.6;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Create a datacenter limit example
curl -X POST http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials\
     -H 'Accept: application/vnd.abiquo.credentials+xml; version=2.6' \
     -H 'Content-Type: application/vnd.abiquo.credentials+xml; version=2.6'   \
     -d @entity.xml \
     -u user:password --verbose


POST http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.limit+xml;version=2.6
Content-Type: application/vnd.abiquo.limit+xml;version=2.6
Content-Length: 575


HTTP/1.1 201 Creado
Date: Fri, 01 Feb 2013 16:33:57 GMT
Location: http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials
Set-Cookie: JSESSIONID=F8C0478080DB529B65C067CCCE19E276.nodeAlbert; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTczODIzNzQxNTpiMjY1OTA3YTFhMWYxNDIwMDhiZWZkMWNmOWUzYzk1NTpBQklRVU8; Expires=Fri, 01-Feb-2013 17:03:57 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.credentials+xml;version=2.6
Content-Length: 2004

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<credentialslist>
    <credentials>
        <link rel="edit" type="application/vnd.abiquo.credentials+xml" href="http://localhost:80/api/admin/enterprises/1/limits/2/credentials/2"/>
        <link rel="machine" type="application/vnd.abiquo.machine+xml" href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/2"/>
        <access>XXXXXXXXXXXX</access>
        <id>2</id>
        <key>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</key>
    </credentials>
</credentialslist>
    

Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

 

Retrieve credentials

Allow an enterprise to use a public datacenter.

Synopsis: GET  http://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/credentials/{limit}/credentials/{credentials}  
Roles Required: ROLE_PHYS_DC_MANAGE
Request Headers: Accept: application/vnd.abiquo.credentials+xml; version=2.6; 
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Create a datacenter limit example
curl -X GET http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials/1\
 		-H 'Accept: application/vnd.abiquo.credentials+xml; version=2.6' \
		-u user:password --verbose 
 
POST http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials HTTP/1.1

Authorization: Basic YWRtaW46eGFiaXF1bw== Accept: application/vnd.abiquo.limit+xml;version=2.6 
Content-Type: application/vnd.abiquo.limit+xml;version=2.6 Content-Length: 575 
HTTP/1.1 201 Creado Date: Fri, 01 Feb 2013 16:33:57 GMT 
Location: http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials 
Set-Cookie: JSESSIONID=F8C0478080DB529B65C067CCCE19E276.nodeAlbert; Path=/api 
Set-Cookie: auth=YWRtaW46MTM1OTczODIzNzQxNTpiMjY1OTA3YTFhMWYxNDIwMDhiZWZkMWNmOWUzYzk1NTpBQklRVU8; Expires=Fri, 01-Feb-2013 17:03:57 GMT; Path=/api 
Server: Apache-Coyote/1.1 Content-Type: application/vnd.abiquo.credentials+xml;version=2.6 
Content-Length: 2004 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <credentials>
    <link rel="edit" type="application/vnd.abiquo.hardwareprofile+xml" href="http://localhost:80/api/admin/enterprises/1/limits/2/credentials/2"/>
    <link rel="machine" type="application/vnd.abiquo.machine+xml" href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/2"/>
    <access>XXXXXXXXXXXXXXXXXXXX</access>
    <id>1</id>
    <key>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</key>
</credentials>
 

Detach credentials

Allow an enterprise to remove the credentials attached for a public datacenter.

This action will leave the virtual machines in public cloud intact, and will put them in platform as NOT_ALLOCATED. 

Synopsis: DELETE  http://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/credentials/{limit}/credentials/{credentials}  
Roles Required: ROLE_PHYS_DC_MANAGE
Request Headers: 
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Create a datacenter limit example
curl -X DELETE http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials/1\
 -u user:password --verbose DELETE http://example.com/api/admin/enterprises/1/limits/1/credentials/1/credentials HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw== Accept: application/vnd.abiquo.limit+xml;version=2.6 Content-Type: application/vnd.abiquo.limit+xml;version=2.6 Content-Length: 575 DELETE http://example.com/api/admin/datacenters/1 HTTP/1.1Authorization: Basic YWRtaW46eGFiaXF1bw==  HTTP/1.1 204 No ContentDate: Wed, 16 Jan 2013 14:11:25 GMTSet-Cookie: JSESSIONID=384F93C08BD5CFE66E100150FEB86522; Path=/apiSet-Cookie: auth=YWRtaW46MTM1ODM0NzI4NTMzMzoyODExZjFlMDYwODMzZmFiMTliYWZmMDJlMzUyMDFjMjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:41:25 GMT; Path=/apiServer: Apache-Coyote/1.1