...
Localtabgroup |
---|
Localtab |
---|
| Localtabgroup |
---|
Localtab |
---|
active | true |
---|
title | Successful invocation |
---|
| Code Block |
---|
{
“archiveFileUrl” : “https://link-to-archive-file”,
“validPeriodInSeconds” : 300
} |
|
Localtab |
---|
| title | Unsuccessful invocations |
---|
| Code Block |
---|
{
"message": "2019-04/08 is an invalid date format. Valid format is year-month-day (yyyy-mm-dd) Pacific Standard Time"
} |
Code Block | {
HTTP request method | GET | URL | https://gateway.api.cloud.wso2.com/api/logs?region=<region>&logType=<log-type>&date= yyyydd | Headers | Content-Type: application/json Authorization: Bearer <Bearer token received by following prerequisites> |
Localtab |
---|
| dd> The following table describes the valid region, logType and date values that you can pass in the URL: Parameter | Valid values |
---|
region | Region of the gateway or load-balancer. For example, us-east , frankfurt . | logType | Either load-balancer or gateway . | date | The current date or a prior date in the following format:yyyy-mm-dd in Pacific Standard Time For example, 2019-03-20.
Note |
---|
| Specifying a future date is not valid and will result in an unsuccessful invocation. |
|
| Headers | Content-Type: application/json Authorization: Bearer <Bearer token received by following prerequisites> |
|
Localtab |
---|
| Localtabgroup |
---|
Localtab |
---|
active | true |
---|
title | Successful invocation |
---|
| Code Block |
---|
{
“archiveFileUrl” : “https://link-to-archive-file”,
“validPeriodInSeconds” : 300
} |
|
Localtab |
---|
title | Unsuccessful invocation |
---|
| Code Block |
---|
{
"message": "load-balance is an invalid 'logType' value. Valid values are : [load-balancer, gateway]"
} |
Code Block |
---|
{
"message": "Logs are not available for the specified type : load-balancer and date : 2019-04-07"
} |
Code Block |
---|
{
"message": "An internal server error occurred during the log retrieval process"
} |
Code Block |
---|
{
"message": "Unauthorized user. User must have admin privileges to invoke the log download API"
} |
|
|
|
|
REST APIs that can be invoked with a subscriber access token
API Store statistics API
...
...
Content-Type: application/json
Authorization: Bearer <Bearer token received by following prerequisites>
...
Code Block |
---|
{
"statisticsType" : "getProviderAPIUsage",
"toDate":"2018-02-22 17:11",
"fromDate": "2016-09-28 00:00"
} |
Parameter | Description |
---|
statisticsType | The type of statistics you need to retrieve for a particular time period. getTopAppUsers - Top Users For Applications getAppApiCallType - API Usage from Resource Path getPerAppAPIFaultCount - Faulty Invocations per Application getProviderAPIUsage - API Usage per Application
|
toDate | The end date of the required period. |
fromDate | The start date of the required period. |
...
Note that your response will differ according to the requested type of statistics. A succesful invocation would be similar to the sample given below.
...
title | Successful invocation |
---|
...
<An error message describing the reason that caused an unsuccesful invocation>
} |
|
|
|
|