GET platform/subscriptions/{SubscriptionID}/metrics

Returns information about platform usage for the specified tenant.

Authorization Roles/Permissions: Must be logged in. Must be an authorized user.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/platform/subscriptions/{SubscriptionID}/metrics[?][ReportYear={year}][&][IncludePerDayUsage={boolean}]
[&]IncludeMetricItemList={boolean}]

Sample Request

The example below shows a request for platform usage metrics for the specified tenant.

Sample Request URL

https://{hostname}/platform/subscriptions/acmepaymentscorp/metrics

Sample request headers

Accept: application/vnd.soa.v80+json

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml
Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
SubscriptionID Path SubscriptionID Required The unique ID assigned to a tenant that has a subscription to the platform.
ReportMonth Query integer Optional 2-digit month for the metrics to be returned (01–12). Defaults to the current month.
ReportYear Query integer Optional 4-digit year for the metrics to be returned. Defaults to the current year.
MetricID[ ] Query string Optional If one or more metrics are specified, only those metrics are included in the response. If this parameter is not included, all metrics are returned. For valid values, see Metric values.
IncludePerDayUsage Query boolean Optional Optional. If set to true, per-day usage metrics are included in the response.
IncludeMetricItemList Query boolean Optional Optional. If set to true, a list of metric items is included in the response.

Response

If successful, this operation returns HTTP status code 200, with the requested metric information.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/vnd.soa.v80+json

Content-Type: application/vnd.soa.v80+json

Sample response body: application/vnd.soa.v80+json

{
  "ReportGeneratedTimestamp":"2016-02-23T19:29:45.018Z",
  "ReportPeriod":{
    "StartDate":"2016-02-01T00:00:00Z",
    "EndDate":"2016-02-23T19:29:44.849Z"
  },
  "UsageMetric":[
    {
      "MetricValue":1,
      "MetricUnits":"Number",
      "MetricID":"ApiCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricID":"PlatformApiUsage",
      "MetricType":"PerDayWithAggregate",
      "DayUsage":[
        {
          "Date":"2016-02-21",
          "MetricItem":[
            {
              "MetricValue":681,
              "MetricUnits":"Number",
              "Name":"TotalUsageCount"
            },
            {
              "MetricValue":279868,
              "MetricUnits":"Millisecond",
              "Name":"TotalResponseTime"
            },
            {
              "MetricValue":7269,
              "MetricUnits":"Byte",
              "Name":"TotalRequestMessageSize"
            },
            {
              "MetricValue":1362500,
              "MetricUnits":"Byte",
              "Name":"TotalResponseMessageSize"
            }
          ]
        },
        {
          "Date":"2016-02-22",
          "MetricItem":[
            {
              "MetricValue":1154,
              "MetricUnits":"Number",
              "Name":"TotalUsageCount"
            },
            {
              "MetricValue":64375,
              "MetricUnits":"Millisecond",
              "Name":"TotalResponseTime"
            },
            {
              "MetricValue":3792,
              "MetricUnits":"Byte",
              "Name":"TotalRequestMessageSize"
            },
            {
              "MetricValue":1540589,
              "MetricUnits":"Byte",
              "Name":"TotalResponseMessageSize"
            }
          ]
        },
        {
          "Date":"2016-02-23",
          "MetricItem":[
            {
              "MetricValue":1588,
              "MetricUnits":"Number",
              "Name":"TotalUsageCount"
            },
            {
              "MetricValue":40898,
              "MetricUnits":"Millisecond",
              "Name":"TotalResponseTime"
            },
            {
              "MetricValue":42,
              "MetricUnits":"Byte",
              "Name":"TotalRequestMessageSize"
            },
            {
              "MetricValue":413662,
              "MetricUnits":"Byte",
              "Name":"TotalResponseMessageSize"
            }
          ]
        }
      ],
      "AggregateUsage":{
        "MetricItem":[
          {
            "MetricValue":3423,
            "MetricUnits":"Number",
            "Name":"TotalUsageCount"
          },
          {
            "MetricValue":385141,
            "MetricUnits":"Millisecond",
            "Name":"TotalResponseTime"
          },
          {
            "MetricValue":11103,
            "MetricUnits":"Byte",
            "Name":"TotalRequestMessageSize"
          },
          {
            "MetricValue":3316751,
            "MetricUnits":"Byte",
            "Name":"TotalResponseMessageSize"
          }
        ]
      }
    },
    {
      "MetricID":"CustomerApiUsage",
      "MetricType":"PerDayWithAggregate",
      "DayUsage":[
        {
          "Date":"2016-02-21",
          "MetricItem":[
            {
              "MetricValue":26,
              "MetricUnits":"Number",
              "Name":"TotalUsageCount"
            },
            {
              "MetricValue":61,
              "MetricUnits":"Millisecond",
              "Name":"TotalResponseTime"
            },
            {
              "MetricValue":0,
              "MetricUnits":"Byte",
              "Name":"TotalRequestMessageSize"
            },
            {
              "MetricValue":1716,
              "MetricUnits":"Byte",
              "Name":"TotalResponseMessageSize"
            }
          ]
        }
      ],
      "AggregateUsage":{
        "MetricItem":[
          {
            "MetricValue":26,
            "MetricUnits":"Number",
            "Name":"TotalUsageCount"
          },
          {
            "MetricValue":61,
            "MetricUnits":"Millisecond",
            "Name":"TotalResponseTime"
          },
          {
            "MetricValue":0,
            "MetricUnits":"Byte",
            "Name":"TotalRequestMessageSize"
          },
          {
            "MetricValue":1716,
            "MetricUnits":"Byte",
            "Name":"TotalResponseMessageSize"
          }
        ]
      }
    },
    {
      "MetricValue":1,
      "MetricUnits":"Number",
      "MetricID":"AppCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":2,
      "MetricUnits":"Number",
      "MetricID":"UserAccountsCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":1,
      "MetricUnits":"Number",
      "MetricID":"GoogleProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":1,
      "MetricUnits":"Number",
      "MetricID":"OpenIDConnectRelyingPartyCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":1,
      "MetricUnits":"Number",
      "MetricID":"OAuthProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":1,
      "MetricUnits":"Number",
      "MetricID":"FacebookProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":1,
      "MetricUnits":"Number",
      "MetricID":"ExternalOAuthProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":0,
      "MetricUnits":"Number",
      "MetricID":"LDAPProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":0,
      "MetricUnits":"Number",
      "MetricID":"SiteMinderProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":0,
      "MetricUnits":"Number",
      "MetricID":"SAMLWebSSOProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricValue":0,
      "MetricUnits":"Number",
      "MetricID":"PingFederateProviderCount",
      "MetricType":"Aggregate"
    },
    {
      "MetricID":"DeploymentZonesUsage",
      "MetricType":"ListWithAggregate",
      "MetricItemList":{
        "Name":[
          "DZ-nd",
          "DZ-nd2"
        ],
        "Type":"DeploymentZone"
      },
      "AggregateUsage":{
        "MetricValue":2,
        "MetricUnits":"Number"
      }
    },
    {
      "MetricID":"PortalVanityURLUsage",
      "MetricType":"ListWithAggregate",
      "MetricItemList":{
        "Name":[
          "acmepaymentsdev-6430.local.acmepaymentscorp.com",
          "acmepaymentscorp.com"
        ],
        "Type":"VanityURL"
      },
      "AggregateUsage":{
        "MetricValue":2,
        "MetricUnits":"Number"
      }
    },
    {
      "MetricID":"ApiVanityURLUsage",
      "MetricType":"ListWithAggregate",
      "MetricItemList":{
        "Name":[
          "stock.acmepaymentscorp",
          "aacmepaymentsdev-6430.local.acmepaymentscorp.com",
          "help.acmepaymentscorp"
        ],
        "Type":"VanityURL"
      },
      "AggregateUsage":{
        "MetricValue":3,
        "MetricUnits":"Number"
      }
    }
  ]
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml

Response Body

Name Type Description
PlatformUsage PlatformUsage Contains information about platform usage for a specific tenant.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.