GET /api/apps/versions/{AppVersionID}/txlogs/export

Exports the transaction log for an app version's usage of an API, to a CSV file.

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/export

Sample Request

The example below shows successful completion of this operation. The usage logs are exported to a CSV file.

Sample Request URL

https://{hostname}/api/apps/versions/7FuucUjB7B3AYcUVvQpEVv1B.demo/txlogs/export?Environment=Sandbox
&Duration=1d&TimeZone=America/New_York&count=100&start=0

Sample request headers

GET /api/apps/versions/7FuucUjB7B3AYcUVvQpEVv1B.demo/txlogs/export?Environment=Sandbox&Duration=1d
&TimeZone=America/New_York&count=100&start=0 HTTP/1.1
Host: acmepaymentscorp.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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 text/csv
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 Required The unique ID for a specific contract between an app version and an API version.
ApiVersionID Path string Required The unique ID for a specific API version.
Environment Query string Required The environment (implementation) (Sandbox or Production). If not specified, defaults to Production.
StartDate Query string Required 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 Required 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. 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).

OperationName

Version: 2019.1.0

Query string Optional The specific operation for which information should be returned.

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 usage logs in an exported CSV file.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Content-Type: text/csv
Content-Disposition: attachment;filename="applogs.csv"
Date: Wed, 16 Apr 2014 21:26:23 GMT

Sample response body

The response body is the applogs.csv file. View an example.

Response Headers

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

Header Description
Content-Type text/csv
Content-Disposition attachment;filename="applogs.csv"

Response Body

Name Type Description
applogs.csv File attachment

A .csv file containing the exported data. It has the following columns:

  • Request Date Time
  • API
  • Method
  • URL
  • Client Host
  • Response Time (in milliseconds )
  • Result
  • Fault Message

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.

You would also get this response if you hadn't completed login before running the operation.

500 An error occurred processing the call.

More information about Akana API Platform API error messages.