GET /api/apis/versions/{APIVersionID}/licensereport

Returns the report definition relating to licenses for the specified API version, for the specified ReportType.

Authorization Roles/Permissions: Must be logged in. Must be a user with Monitor permission for the API; an API Admin, Business Admin, or App team member for an app that has a contract with the API.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/apis/versions/{APIVersionID}/licensereport?ReportType={ReportType}

Sample Request

The example below shows a request for a specific license report for the specified API version.

Sample Request URL

https://{hostname}/api/apis/versions/8cd656b4-a585-4e79-b669-db693fca46cf.acmepaymentscorp/licensereport?ReportType=api.usage.by.app.per.license

Sample request headers

Accept: application/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.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml, application/vnd.soa.v81+json, application/vnd.soa.v81+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
ApiVersionID Path string Required The unique ID for a specific API version.
LicenseID Query string Optional The unique ID for a specific license.
AppVersionID Query string Optional The unique ID for a specific app version.
MetricName Query string Optional The name for a specific metric.
ReportType Query string Required The type of metric information used in the license report. For valid values, see ReportType: License Report.
Environment Query string Optional The environment (implementation) (Sandbox or Production). If not specified, defaults to Production.
StartDate Query string Optional The beginning point for the date range of metric information requested. Format: YYYY-MM-DD:THH:MM:SS. Example: StartDate=2011-01-01T11:55:22. If StartDate is not specified, the operation uses EndDate minus Duration. If both StartDate and EndDate are unspecified, the operation returns information for the Duration value, and if Duration is also unspecified it returns default Duration value of 2 hours.
EndDate Query string Optional The ending point for the date range of metric information requested. Format: YYYY-MM-DD:THH:MM:SS. Example: EndDate=2011-01-02T11:55:22. If not specified, defaults to the current date/time of the API call.
TimeZone Query string Optional The time zone for the information. If a time zone isn't specified, the information is returned in GMT. For more information, refer to Working with Time Zones and Time Intervals.
Duration Query string Optional The duration for the metric information. If not specified, defaults to one day (1d). The StartDate, EndDate, and Duration fields work together to define the information to be returned.

Response

If successful, this operation returns HTTP status code 200, with the information for the license report.

Sample Response

The sample response below returns information for the api.usage.by.app.per.license report.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Wed, 22 Apr 2015 15:19:51 GMT

Sample response body: application/json

{
  "ReferencedObjects" : {
    "APIVersion" : [ {
      "APIVersionID" : "8cd656b4-a585-4e79-b669-db693fca46cf.acmepaymentscorp",
      "APIID" : "02b2c3c9-90c0-4dce-8b3a-71f578c19ba0.acmepaymentscorp",
      "Name" : "Version 2",
      "Description" : "Update with enhancements",
      "Type" : "shttp",
      "Tag" : [ "payments" ],
      "Visibility" : "Limited",
      "Created" : "2015-04-22T19:48:47Z",
      "Updated" : "2015-04-22T19:48:47Z",
      "State" : "com.soa.api.state.open",
      "ProductionEndpointAccessAutoApproved" : true,
      "SandboxEndpointAccessAutoApproved" : true,
      "SandboxAnonymousAccessAllowed" : false,
      "ProductionAnonymousAccessAllowed" : false,
      "ResourceLevelPermissionsSupported" : true,
      "APIOwnedImplementations" : true,
      "ProductionServiceKey" : "uddi:976acd47-e928-11e4-bbb3-cf1bd1a9e489",
      "SandboxServiceKey" : "uddi:98b88338-e928-11e4-bbb3-cf1bd1a9e489"
    } ],
    "API" : [ {
      "APIID" : "02b2c3c9-90c0-4dce-8b3a-71f578c19ba0.acmepaymentscorp",
      "Name" : "ACME Payments API",
      "Description" : "Payments API for ACME payment type.",
      "Visibility" : "Limited",
      "LatestVersionID" : "8cd656b4-a585-4e79-b669-db693fca46cf.acmepaymentscorp",
      "IsFollowed" : false,
      "AdminGroupID" : "apiadmin-02b2c3c9-90c0-4dce-8b3a-71f578c19ba0.acmepaymentscorp",
      "Created" : "2015-04-22T14:22:15Z",
      "Updated" : "2015-04-22T19:48:47Z",
      "AvatarURL" : "http://{hostname}/api/apis/02b2c3c9-90c0-4dce-8b3a-71f578c19ba0.acmepaymentscorp/avatar"
    } ]
  }
}

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.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml, application/vnd.soa.v80+json, application/vnd.soa.v80+xml, application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Response Body

Name Type Description
Report Report Contains information about a performance report for an app or API.

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
400 Bad request: Returned if the client sends a malformed request; for example, invalid parameters or body content.For example, you might get this response if you didn't include the required ReportType parameter in the request.
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.