Loading...
 

Get Node Rated Usage


HTTP VerbGET
URI Template/account/{accID}/node/{nodeID}/ratedusage/virtual?detailed={true|false}&startTime={st}&endTime={et}
MIME Typeapplication/vnd.pncp.v.1.0+json onwards
Normal HTTP Response Code200 OK
Invoked ByResellers can invoke this for their own account as well as any other account they own. End-clients can invoke this for their account only.
Response ModeSynchronous.

Sample Request

GET /pncp-external-api-rest/account/88/node/1/ratedusage/virtual?detailed=true&endTime=1327586794626 &startTime=1324994795026 HTTP/1.1
Accept: application/vnd.pncp.v.5.0+json 
Authorization: PNCP J0PVMr5Tp90lnIKNp9wyXh7ztb9FOhJcb+86tuEqRWs=
Content-Length: 0
User-Agent: Jakarta Commons-HttpClient/3.1
Host: YOUR_API_URL

Sample Response (When DETAILED is TRUE)

Note: the JSON body of the example response has been trimmed to improve the readability of this document.

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Content-Type: application/vnd.pncp.v.5.0+json
Transfer-Encoding: chunked
Date: Thu, 26 Jan 2012 14:06:52 GMT

{
   "startTime":"2012/01/31 16:51:00",
   "endTime":"2012/03/01 01:35:00",
   "currencyCode":"840",
   "totalAmount":47.000000,
   "ratedUsageItems":[
      {
         "amountToBill":8.500000,
         "quantity":5.0,
         "unitPrice":1.700000,
         "pricePointDescription":"1 outgoing non-load balanced traffic [GB]"
      },
      {
         "amountToBill":8.500000,
         "quantity":5.0,
         "unitPrice":1.700000,
         "pricePointDescription":"1 outgoing load balanced traffic [GB]"
      },

	…

      {
         "amountToBill":15.000000,
         "quantity":10.0,
         "unitPrice":1.500000,
         "pricePointDescription":"1 incoming non-load balanced traffic [GB]"
      },
      {
         "amountToBill":15.000000,
         "quantity":10.0,
         "unitPrice":1.500000,
         "pricePointDescription":"1 incoming load balanced traffic [GB]"
      }
   ]
}

Sample Response (When DETAILED is FALSE)

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Content-Type: application/vnd.pncp.v.5.0+json
Transfer-Encoding: chunked
Date: Thu, 26 Jan 2012 14:11:16 GMT

{
   "startTime":"2012/01/31 16:51:00",
   "endTime":"2012/03/01 01:35:00",
   "currencyCode":"840",
   "totalAmount":47.000000,
   "ratedUsageItems":null
}

Notes

  • billingUnit can take values HOUR, BYTE, MEGABYTE, GIGABYTE, TERABYTE, BYTE_HOUR, MEGABYTE_HOUR, GIGABYTE_HOUR, TERABYTE_HOUR or NONE.
  • startTime and endTime must be specified in Mountain Standard Time (MST).
  • The endTime field in the response represents the latest date for which records are available within the time period specified in the request. The request will return a 404 error if there are no billing records within the time period specified. Below is a table showing the resultant endTime in the response for different scenarios:
Request startTimeRequest endTimeLast Billing RecordResponse endTime
2016/01/15 00:00:002016/02/15 00:00:002016/01/01 00:00:00404 Exception
2016/01/15 00:00:002016/02/15 00:00:002016/02/01 00:00:002016/02/01 00:00:00
2016/01/15 00:00:002016/02/15 00:00:002016/03/01 00:00:002016/02/15 00:00:00