Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Contents:

License Resource

The License resource provides access to the licensing management features.

Main URI of the Resource

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

Exposed Methods

List licenses

List all existing licenses.

Synopsis: GET http://example.com/api/config/licenses 
Roles Required: SYSCONFIG_VIEW,PHYS_DC_MANAGE
Request Headers: Accept:  application/vnd.abiquo.licenses+json; version=4.4; application/vnd.abiquo.licenses+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

active

false

 

If true, list only the active licenses. If false, list only disabled licenses.

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

 Click here to show or hide the request example
List existing licenses example
$ curl http://example.com/api/config/licenses/ \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.licenses+json;version=4.0"
 
 
{
    "links": [],
    "collection": [
        {
            "id": 3,
            "numcores": 2,
            "expiration": "2017-04-01 00:00:00",
            "code": "license-code",
            "scalingGroupsEnabled": true,
            "links": [
                {
                    "title": "license-code",
                    "rel": "edit",
                    "type": "application/vnd.abiquo.license+json",
                    "href": "https://abiquo.example.com:443/api/config/licenses/3"
                }
            ],
            "enabledPlugins": "VMX_04,AMAZON,nsx-ecmp"
        },
        {
            "id": 4,
            "numcores": 24,
            "expiration": "2020-1-1 00:00:00",
            "code": "license-code-2",
            "scalingGroupsEnabled": true,
            "links": [
                {
                    "title": "license-code-2",
                    "rel": "edit",
                    "type": "application/vnd.abiquo.license+json",
                    "href": "https://abiquo.example.com:443/api/config/licenses/4"
                }
            ]
        }
    ],
    "availablecores": 26
}

Add a license

Add a new license.

Synopsis: POST http://example.com/api/config/licenses 
Roles Required: SYSCONFIG_ALLOW_MODIFY
Request Headers: Accept:  application/vnd.abiquo.license+json; version=4.4; application/vnd.abiquo.license+xml; version=4.4;  Content-type:  application/vnd.abiquo.license+json; version=4.4; application/vnd.abiquo.license+xml; version=4.4;

Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example

Request:

Add a new license example
$ curl http://example.com/api/config/licenses/ \
    -v -u user:pass \
    -X POST \
    -d @entity.json \
    -H "Accept: application/vnd.abiquo.license+json;version=4.0" \
    -H "Content-Type: application/vnd.abiquo.license+json;version=4.0"
 
 

Request body (entity.json)

{
	"links": [],
	"code": "license-code"
}

Status: 201 Created

Response body

{
    "id": 9,
    "numcores": 24,
    "expiration": "2020-1-1 00:00:00",
    "code": "license-code-2": true,
    "links": [
        {
            "title": "license-code-2",
            "rel": "edit",
            "type": "application/vnd.abiquo.license+json",
            "href": "https://abiquo.example.com:443/api/config/licenses/9"
        }
    ]
}

Get a license that is registered in Abiquo

Get the information of an existing license.

Synopsis: GET http://example.com/api/config/licenses/{license} 
Roles Required: SYSCONFIG_VIEW
Request Headers: Accept:  application/vnd.abiquo.license+json; version=4.4; application/vnd.abiquo.license+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Get the information of an existing license example
$ curl http://example.com/api/config/licenses/1 \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.license+json;version=4.0"

Response example:

{
    "id": 9,
    "numcores": 2147483647,
    "expiration": "2020-1-1 00:00:00",
    "code": "license-code",
    "scalingGroupsEnabled": true,
    "links": [
        {
            "title": "license-code",
            "rel": "edit",
            "type": "application/vnd.abiquo.license+json",
            "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/licenses/9"
        }
    ]
}

Remove a license

 
Remove an existing license.

Synopsis: DELETE http://example.com/api/config/licenses/{license} 
Roles Required: SYSCONFIG_ALLOW_MODIFY
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
Remove an existing license example
$ curl http://example.com/api/config/licenses/1 \
    -v -u user:pass \
    -X DELETE
 
DELETE /api/config/licenses/1 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
Host: example.com
Accept: */*
 
HTTP/1.1 204 No Content
Date: Mon, 22 Aug 2016 12:53:53 GMT
Set-Cookie: auth=YWRtaW46MTM0NTQ2OTAzMzg5NToxOWU3ZjgzMDE0NTViY2MyOWUxMzVmMDczNzdhNDRmYjpBQklRVU8; Expires=Mon, 22-Aug-2016 13:23:53 GMT; Path=/api
Set-Cookie: JSESSIONID=123B3D29B2F275A327593A6056B9F104; Path=/api
Content-Length: 0
Content-Type: text/plain