GET /api/apps/versions/{AppVersionID}/txlogs
Returns up to 1000 transaction logs for the specified app version. If no count parameters specified, returns 100 transactions.
With the optional ContractID, returns transaction logs for a specific app/API contract. Additional optional parameters allow you to specify more clearly the set of transaction logs that you want.
For additional information regarding the set of operations dealing with metric information, see Metrics on the Platform.
Authorization Roles/Permissions: Must be logged in. Must have monitor permission for the app; an App team member, Business Admin, or API Admin for an API that the app has a contract with.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apps/versions/{AppVersionID}/txlogs[?ContractID={ContractID}][&Environment={Environment}] [&StartDate={StartDate}][&EndDate={EndDate}][&TimeZone={TimeZone}][&Duration={Duration}][&Start={Start}]
Sample Request
The example below shows a request for the transaction log for the specified app version in the Sandbox implementation. The request is limited to the first 100 transactions.
Sample request URL
http://{hostname}/api/apps/versions/7FuucUjB7B3AYcUVvQpEVv1B.demo/txlogs?Environment=Sandbox &Duration=1d&TimeZone=America%2FNew_York&count=100&start=0
Sample request headers
GET /api/apps/versions/7FuucUjB7B3AYcUVvQpEVv1B.demo/txlogs?Environment=Sandbox&Duration=1d &TimeZone=America%2FNew_York&count=100&start=0 HTTP/1.1 Host: <localhost> Accept: application/json, text/javascript, */*; q=0.01 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, text/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 | Path | string | Required | The unique ID for a specific app version. |
ContractID | Query | string | Optional |
The unique ID for a specific contract between an app version and an API version. If you specify ContractID you will only get transactions for that contract; therefore, the values for each transaction in the response transaction set will be the same for all fields except RequestDateTime and ResponseStatusCode. Note: ContractID and APIAccessRequest are synonymous. |
ApiVersionID | Path | string | Required | The unique ID for a specific API version. |
OperationName | Query | string | Required |
The specific operation for which information should be returned. Note: Must be used in combination with the ApiVersionID parameter. |
Environment | Query | string | Optional | The environment (implementation) (Sandbox or Production). If not specified, defaults to Production. |
StartDate | Query | string | Optional | The start date for log items to be returned. If StartDate is not provided, transactions are returned starting with the most recent, and the length of time is determined by the Duration setting. |
EndDate | Query | string | Optional | The end date for log items to be returned. If StartDate and Duration are provided, EndDate is calculated automatically. |
TimeZone | Query | string | Optional | The time zone for the request. Default: GMT. |
Duration | Query | string | Optional | The duration for the metric information. For example, you might want metric information for a 24-hour period or only for an hour. The StartDate, EndDate, and Duration fields work together to define the information to be returned. If not specified, defaults to two hours (2h). |
start | Query | integer | Optional | The starting point for the results to be returned. For example, if there are 100 results and you already have the first 20 (0-19), set the Start value to 20 to continue with the next one. |
count | Query | integer | Optional | The count of log items. Max: 1000. Default: 100. |
Status Version: 2019.1.0 |
Query | integer | Required | One more more specific HTTP status values. If Status is specified, only transactions with that status are included in the results. For valid values, see Status (HTTP). |
FromResponseTime Version: 2019.1.0 |
Query | integer | Required | The beginning time of a range. |
ToResponseTime Version: 2019.1.0 |
Query | integer | Required | The ending time of a range. |
Response
If successful, this operation returns HTTP status code 200, with the transaction logs in JSON or XML format.
Sample Response
The sample response below shows five transactions in the log.
Sample response headers: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 2199 Date: Wed, 16 Apr 2014 20:32:26 GMT
Sample response body: application/json
{ "TransactionInfo" : [ { "TransactionID" : "97dbd8a7-c5a5-11e3-829c-9e428460984d", "APIID" : "775a3d03-857f-48cb-bce6-a7cea40c6d3e.demo", "APIName” : "ACME Payments API", "APIVersionID" : "7080623c-57fd-433f-a127-b0c2fe3889d7.demo", "MethodName" : "GetPayment", "AppID" : "411d0425-e83a-4110-9e03-34c758eebce0.demo", "AppName" : "Crosfhocal", "AppVersionID" : "7FuucUjB7B3AYcUVvQpEVv1B.demo", "RequestDateTime" : "2014-04-16T16:27:55-04:00", "ResponseStatusCode" : 200, "ClientHost" : "173.169.155.199", "APIVersionName" : "4/16/14", "MethodKey" : "97dbd8a7-c5a5-11e3-829c-9e428460984d", "AppVersionName" : "1", "AppRuntimeID" : "7FuucUjB7B3AYcUVvQpEVv1B", "ResponseTime" : "P0Y0M0DT0H0M0.121S", "RequestMessageSize" : 0, "ResponseMessageSize" : 39420, "APIResponseTime" : "P0Y0M0DT0H0M0.000S", "APIURL" : "http://api.acmepaymentscorp.com/payments/", "HttpVerb" : "GET" }, { "TransactionID" : "97545925-c5a5-11e3-829c-9e428460984d", "APIID" : "775a3d03-857f-48cb-bce6-a7cea40c6d3e.demo", "APIName" : "ACME Payments API", "APIVersionID" : "7080623c-57fd-433f-a127-b0c2fe3889d7.demo", "MethodName" : "GetPayment", "AppID" : "411d0425-e83a-4110-9e03-34c758eebce0.demo", "AppName" : "Crosfhocal", "AppVersionID" : "7FuucUjB7B3AYcUVvQpEVv1B.demo", "RequestDateTime" : "2014-04-16T16:27:55-04:00", "ResponseStatusCode" : 200, "ClientHost" : "173.169.155.199", "APIVersionName" : "4/16/14", "MethodKey" : "97545925-c5a5-11e3-829c-9e428460984d", "AppVersionName" : "1", "AppRuntimeID" : "7FuucUjB7B3AYcUVvQpEVv1B", "ResponseTime" : "P0Y0M0DT0H0M0.121S", "RequestMessageSize" : 0, "ResponseMessageSize" : 39420, "APIResponseTime" : "P0Y0M0DT0H0M0.000S", "APIURL" : "http://api.acmepaymentscorp.com/payments/", "HttpVerb" : "GET" }, { "TransactionID" : "96bfba43-c5a5-11e3-829c-9e428460984d", "APIID" : "775a3d03-857f-48cb-bce6-a7cea40c6d3e.demo", "APIName" : "ACME Payments API", "APIVersionID" : "7080623c-57fd-433f-a127-b0c2fe3889d7.demo", "MethodName" : "GetPayment", "AppID" : "411d0425-e83a-4110-9e03-34c758eebce0.demo", "AppName" : "Crosfhocal", "AppVersionID" : "7FuucUjB7B3AYcUVvQpEVv1B.demo", "RequestDateTime" : "2014-04-16T16:27:54-04:00", "ResponseStatusCode" : 200, "ClientHost" : "173.169.155.199", "APIVersionName" : "4/16/14", "MethodKey" : "96bfba43-c5a5-11e3-829c-9e428460984d", "AppVersionName" : "1", "AppRuntimeID" : "7FuucUjB7B3AYcUVvQpEVv1B", "ResponseTime" : "P0Y0M0DT0H0M0.124S", "RequestMessageSize" : 0, "ResponseMessageSize" : 39420, "APIResponseTime" : "P0Y0M0DT0H0M0.000S", "APIURL" : "http://api.acmepaymentscorp.com/payments/", "HttpVerb" : "GET" }, { "TransactionID" : "969500c1-c5a5-11e3-829c-9e428460984d", "APIID" : "775a3d03-857f-48cb-bce6-a7cea40c6d3e.demo", "APIName" : "ACME Payments API", "APIVersionID" : "7080623c-57fd-433f-a127-b0c2fe3889d7.demo", "MethodName" : "GetPayment", "AppID" : "411d0425-e83a-4110-9e03-34c758eebce0.demo", "AppName" : "Crosfhocal", "AppVersionID" : "7FuucUjB7B3AYcUVvQpEVv1B.demo", "RequestDateTime" : "2014-04-16T16:27:53-04:00", "ResponseStatusCode" : 200, "ClientHost" : "173.169.155.199", "APIVersionName" : "4/16/14", "MethodKey" : "969500c1-c5a5-11e3-829c-9e428460984d", "AppVersionName" : "1", "AppRuntimeID" : "7FuucUjB7B3AYcUVvQpEVv1B", "ResponseTime" : "P0Y0M0DT0H0M0.121S", "RequestMessageSize" : 0, "ResponseMessageSize" : 39420, "APIResponseTime" : "P0Y0M0DT0H0M0.000S", "APIURL" : "http://api.acmepaymentscorp.com/payments/", "HttpVerb" : "GET" }, { "TransactionID" : "869b30c0-c5a5-11e3-829c-9e428460984d", "APIID" : "775a3d03-857f-48cb-bce6-a7cea40c6d3e.demo", "APIName" : "ACME Payments API", "APIVersionID" : "7080623c-57fd-433f-a127-b0c2fe3889d7.demo", "MethodName" : "GetPayment", "AppID" : "411d0425-e83a-4110-9e03-34c758eebce0.demo", "AppName" : "Crosfhocal", "AppVersionID" : "7FuucUjB7B3AYcUVvQpEVv1B.demo", "RequestDateTime" : "2014-04-16T16:27:26-04:00", "ResponseStatusCode" : 200, "ClientHost" : "173.169.155.199", "APIVersionName" : "4/16/14", "MethodKey" : "869b30c0-c5a5-11e3-829c-9e428460984d", "AppVersionName" : "1", "AppRuntimeID" : "7FuucUjB7B3AYcUVvQpEVv1B", "ResponseTime" : "P0Y0M0DT0H0M0.122S", "RequestMessageSize" : 0, "ResponseMessageSize" : 39024, "APIResponseTime" : "P0Y0M0DT0H0M0.000S", "APIURL" : "http://api.acmepaymentscorp.com/payments/", "HttpVerb" : "GET" } ] }
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type | application/json, text/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 |
---|---|---|
TransactionsInfo | TransactionsInfo [ ] | Contains information about one or more transactions for the app, with details for each. |
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 |
---|---|
204 | No content. You might get this error if there are no transactions to report. |
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.