An XML or JSON representation of resource usage and limits

get

/usage

Obtain the usage information

  • How many connections, destinations, and durable subscriptions are currently being used, and what are the maximum numbers of each that can be used for the given service instance.
  • The hard and soft quotas on destination backlogs.  Note that the API returns only the quotas, not the backlog sizes.  For more information, see Hard and Soft Quotas
  • Metering data - How many bytes of data have been sent out through the REST API (the egress data) and the number of calls to the REST API in a particular period of time.  The egress data includes all bytes sent in HTTP responses, including status line, headers, and the response body.  The number of calls to the REST API includes all HTTP requests made.

Request

There are no request parameters for this operation.

Back to Top

Response

Supported Media Types

200 Response

The connection, destination, and durable subscription usage is given by the connectionCount, destinationCount, and durableSubscriptionCount elements respectively. Each of these elements contains a max element whose content is the maximum number of connections, destinations, or durable subscriptions that may be used, and a used element whose content is the current number of connections, destinations, or durable subscriptions in use (subject to the above caveats about the data not being real-time). Destination backlog limitations on number and number of bytes of messages are given by the destinationBacklogMessageCount and destinationBacklogBytes elements respectively. Each of these elements contains a hardQuota element whose content is the hard quota and a softQuota element whose content is the soft quota.
Back to Top

Examples

cURL Command

curl -s -u $USER:$PASS \
     -H "Accept: application/json" \
     -X GET "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/usage"

There is no request body to submit with the HTTP request.

Example of Response Body

{
    "connectionCount": {
        "max": 100, 
        "used": 12
    }, 
    "destinationBacklogBytes": {
        "hardQuota": 524288000, 
        "softQuota": 367001600
    }, 
    "destinationBacklogMessageCount": {
        "hardQuota": 100000, 
        "softQuota": 70000
    }, 
    "durableSubscriptionCount": {
        "max": 10000, 
        "used": 8
    }, 
    "queueCount": {
        "max": 10000, 
        "used": 21 
    }, 
    "topicCount": {
        "max": 10000, 
        "used": 3
    }, 
    "meteredUsages": [
        {
            "dataCenter": "dc", 
            "endTimeUtc": "2016-03-16T18:09", 
            "meteredResourceUsages": [
                {
                    "quantity": 6656, 
                    "resourceName": "EGRESS_DATA", 
                    "units": "Bytes"
                }, 
                {
                    "quantity": 8, 
                    "resourceName": "API_CALLS", 
                    "units": "API Calls"
                }
            ], 
            "startTimeUtc": "2016-03-16T18:00"
        }, 
        {
            "dataCenter": "dc", 
            "endTimeUtc": "2016-03-16T17:39", 
            "meteredResourceUsages": [
                {
                    "quantity": 13944, 
                    "resourceName": "EGRESS_DATA", 
                    "units": "Bytes"
                }, 
                {
                    "quantity": 16, 
                    "resourceName": "API_CALLS", 
                    "units": "API Calls"
                }
            ], 
            "startTimeUtc": "2016-03-16T17:30"
        }, 
        {
            "dataCenter": "dc", 
            "endTimeUtc": "2016-03-16T18:29", 
            "meteredResourceUsages": [
                {
                    "quantity": 10759, 
                    "resourceName": "EGRESS_DATA", 
                    "units": "Bytes"
                }, 
                {
                    "quantity": 13, 
                    "resourceName": "API_CALLS", 
                    "units": "API Calls"
                }
            ], 
            "startTimeUtc": "2016-03-16T18:20"
        }, 
        {
            "dataCenter": "dc", 
            "endTimeUtc": "2016-03-16T17:49", 
            "meteredResourceUsages": [
                {
                    "quantity": 13628, 
                    "resourceName": "EGRESS_DATA", 
                    "units": "Bytes"
                }, 
                {
                    "quantity": 16, 
                    "resourceName": "API_CALLS", 
                    "units": "API Calls"
                }
            ], 
            "startTimeUtc": "2016-03-16T17:40"
        }
    ]
}
Back to Top