Get the Number of Billable Transactions
get
/console/admin/api/v1.1/dashboard/statistics/billableTrans
Get the number of billable transactions.
Request
Supported Media Types
- application/json
Query Parameters
-
channel(optional): string
Channel name
-
endTime(optional): string
The end time of a time range in the format 'yyyyMMddhhmmss'
-
nodeID(optional): string
Node ID of a specific peer
-
startTime(optional): string
The start time of a time range in the format 'yyyyMMddhhmmss'
Response
Supported Media Types
- application/json
200 Response
Response with a series of billable transactions by restriction
400 Response
Invalid arguments
Default Response
Unexpected error
Examples
This endpoint is used to get the number of billable transactions for a peer or channel. Parameters
nodeID
and
channel
are used to set the scope of the query. The result is a JSON file including the total number of the specified scope in the specified time range.
- If a peer is specified using
nodeID
but the channel isn't specified, the total number of billable transactions by this peer on all channels is returned. - If a channel is specified using
channel
but the peer node isn't specified, the total number of billable transactions on this channel by all peers is returned. - If both peer and channel are specified, the number of billable transactions by the specified peer on the specified channel is returned.
The following example shows how to generate the billable transaction metrics by submitting a GET request on the REST resource using cURL.
curl -X GET -u username:password -k "http://<rest_server_url>:port/console/admin/api/v1.1/dashboard/statistics/billableTrans?nodeID=<nodeID>&channel=<channel>&startTime=<yyyymmddhhmmss>&endTime=<yyyymmddhhmmss>"
For example,
curl -X GET -u myname@oracle.com:mypswd -k "http://server.oracle.com:10000/console/admin/api/v1.1/dashboard/billableTrans?nodeID=peer0-1&channel=tfzch01&startTime=20190224030000&endTime=20190224050000"
Example of the Response Body
The following example shows the contents of the response body in JSON format:
{ "data": { "nodeId": "peer0-1", "billableTrans": [ { "channelName": "tfzch01", "startTime": "Sun, 24 Feb 2019 03:00:00 GMT", "endTime": "Sun, 24 Feb 2019 05:00:00 GMT", "trans": 2 } ] } }