List Usages

Overview

This API lists your Guest Image usage information.

Classification

  • List

API Operation Object

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{api_endpoint}/v1.0/{tenant_id}/usages

HTTP Request Header

Accept: application/json
Content-Type: application/json
X-Auth-Token: <token>

HTTP Request Body

Format

  • none

Request Parameter

Input Parameters
name style format description required/optional default value action for invalid parameter response code for invalid parameter
tenant_id URL UUID ID for the tenant. required - Terminate 403, 404
from query dateTime date to list usage from. optional beginning of the month Terminate 400
to query dateTime date to list usage to. month of the parameter must be the same as ‘from’ optional end of the month Terminate 400
license_type query String name of license type to show optional
Terminate 400

Response

HTTP Response Header

Format

HTTP/1.1 200 OK
  • <response_code>: see “HTTP Responses” section
  • <message>: message based on the response code

Response Code

Response Codes
response code condition
200 normal end
400 specified parameter is invalid
401 unauthorized
403 tenant is not available
404 not found a specified item
405 request URL or method is invalid
413 any parameter is over the maximum number
500 compute fault

HTTP Response Body

Format

{
    "tenant_id": "b322a85578de48beba0f92acce57869b",
    "usages": <usages>
}

Response Parameter

Response Parameters
item format   description
tenant_id String   id of the tenant to show usage
usages Usage Array   usage information

Sample Request and Response

Sample API Request

Request URI

https://dedicated-hypervisor-jp1-ecl.api.ntt.com/v1.0/b322a85578de48beba0f92acce57869b/usages

HTTP Request Header

GET /v1.0/b322a85578de48beba0f92acce57869b/usages
User-Agent: curl/7.35.0
Host: 192.168.150.51:8774
Content-Type: application/json
Accept: application/json
X-Auth-Token: 62d528dc0cca4827b0ed465efe1c2588

HTTP Request Body

  • none

Sample API Response

HTTP Response Header

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: <content-length>
Date: Thu, 17 Jul 2014 04:21:06 GMT

HTTP Response Body

{
    "tenant_id": "9da9116d-cc44-4ad8-aca5-7db398fcb477",
    "usages": [
        {
            "id": "9da9116d-cc44-4ad8-aca5-7db398fcb477",
            "type": "dedicated-hypervisor.guest-image.sql-server-2014-standard",
            "value": "4",
            "unit": "vCPU",
            "name": "SQL Server 2014 Standard Edition",
            "description": "SQL Server 2014 Standard Edition",
            "has_license_key": false,
            "resource_id":  "d-cc44-4ad8-aca5-7db398fcb477aaaaaa"
        },
        {
            "id": "9da9116d-cc44-4ad8-aca5-7db398fcb478",
            "type": "dedicated-hypervisor.guest-image.sql-server-2014-standard",
            "value": "6",
            "unit": "vCPU",
            "name": "SQL Server 2014 Standard Edition",
            "description": "SQL Server 2014 Standard Edition",
            "has_license_key": false,
            "resource_id":  "d-cc44-4ad8-aca5-7db398fcb477bbbbbb"
        },
        {
            "id": "9da9116d-cc44-4ad8-aca5-7db398fcb479",
            "type": "dedicated-hypervisor.guest-image.windows-server",
            "value": "3",
            "unit": "VM",
            "name": "Windows Server",
            "description": "Windows Server 2008 - 2012 R2",
            "has_license_key": false,
            "resource_id":  "4ad8-aca5-7db398fcb477bbbbbbd-cc44"
        }
    ]
}