GET /api/apps/versions/{AppVersionID}/licensereport
Returns the report definition relating to licenses for the specified app version, for the specified ReportType.
Authorization Roles/Permissions: Must be logged in. Must be a user with Monitor permission for the app; an App team member, Business Admin, or API Admin for an API that has a contract with the app.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apps/versions/{AppVersionID}/licensereport
Sample Request
The example below shows a request for a specific license report for the specified app version.
Sample Request URL
https://{hostname}/api/apps/apps/versions/3Bq6K4CcMGb6YYpaMxJ2miAk.acmepaymentscorp/licensereport?ReportType=app.usage.api.quotas
Sample request headers
Accept: application/json X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...
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 |
---|---|---|---|---|
AppVersionID | Query | string | Required | The unique ID for a specific app version. |
LicenseID | Query | string | Optional | The unique ID for a specific license. |
ApiVersionID | Path | string | Optional | The unique ID for a specific API 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 app.usage.api.quotas report.
Sample response headers: application/json
Status Code: 200 OK Content-Type: application/json Expires: Wed, 22 Apr 2015 19:29:14 GMT
Sample response body: application/json
{ "ReferencedObjects" : { "APIVersion" : [ { "APIVersionID" : "8cd656b4-a585-4e79-b669-db693fca46cf.acmepaymentscorp", "APIID" : "02b2c3c9-90c0-4dce-8b3a-71f578c19ba0.acmepaymentscorp", "Name" : "v2", "Description" : "v2", "Type" : "shttp", "Tag" : [ "payments" ], "Visibility" : "Public", "Created" : "2015-04-22T19:48:47Z", "Updated" : "2015-04-23T00:13:42Z", "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" } ], "ApplicationVersion" : [ { "RuntimeID" : "3Bq6K4CcMGb6YYpaMxJ2miAk.acmepaymentscorp", "AppID" : "5d31dd70-a68a-424b-a9fc-3108587f5c20.acmepaymentscorp", "Name" : "1.0", "Description" : "s", "WebsiteAddress" : "", "Visibility" : "Public", "InitialEnvironment" : "Sandbox", "CurrentEnvironment" : "Sandbox", "Tag" : [ ], "HasKeyInfo" : false, "Created" : "2015-04-22T14:22:11Z", "Updated" : "2015-04-23T00:12:00Z", "State" : "com.soa.app.state.review", "SecurityMechanisms" : [ "com.soa.security.mechanism.sharedsecret" ], "Identity" : "acmepaymentscorp-3Bq6K4CcMGb6YYpaMxJ2miAk" } ], "Application" : [ { "AppID" : "5d31dd70-a68a-424b-a9fc-3108587f5c20.acmepaymentscorp", "Name" : "crosfhocal", "Description" : "s", "Visibility" : "Public", "DefaultVersionID" : "3Bq6K4CcMGb6YYpaMxJ2miAk.acmepaymentscorp", "IsFollowed" : true, "State" : "com.soa.app.state.active", "Created" : "2015-04-22T14:22:11Z", "Updated" : "2015-04-23T00:12:00Z", "AvatarURL" : "http://{hostname}/api/apps/5d31dd70-a68a-424b-a9fc-3108587f5c20.acmepaymentscorp/avatar", "TeamID" : "appteam-5d31dd70-a68a-424b-a9fc-3108587f5c20.acmepaymentscorp" } ] } }
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.