Table of Contents |
---|
...
Get the access token e.g. with OAuth2 Password grant. You may use the --insecure
flag in case self-signed certificates are used:
Code Block | ||
---|---|---|
| ||
$ curl \ --request POST 'https://<sso-base-url>/uas/oauth2/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=password' \ --data-urlencode 'scope=openid <accounting-client-id>' \ --data-urlencode 'client_id=<oauth2-client-id>' \ --data-urlencode 'client_secret=<oauth2-client-secret>' \ --data-urlencode 'username=<accounting-api-user>' \ --data-urlencode 'password=<accounting-api-password>' |
...
Tip | ||
---|---|---|
| ||
The API specification for your installation is available in https://<accounting-base-url>/v2v3/api-docs |
Authentication
Add the OAuth2 access token received from SSO like explained in Get access token to the Authorization header as a bearer token:
...
Parameter name | Description |
---|---|
period | The period of the time from which to return the events: MINUTE, HOUR, DAY, WEEK (7 days), MONTH - case insensitive. NOTE that you should choose such a period that produces a reasonable amount of events in the response so that you don't overuse resources. In typical installations, a period longer than a DAY is not recommended. It is better to make consecutive calls with a shorter period. See also |
datetime | Optional date/timestamp for the earliest events to include with ascending order or latest events to include with descending order. The required precision for the parameter depends on the given period. If not given, derived from the current time and given period.
The times are handled in UTC time zone so if you specify e.g. |
Query parameters
Parameter name | Description |
---|---|
sort | Sort direction, provide '-' for descending order by timestamp, otherwise ascending order by timestamp is used. |
...
Header name | Description |
---|---|
Authorization | Mandatory bearer token e.g. 'Authorization: Bearer eyJjdHkiOiJKV1Q...' (token truncated) |
Accept | Optional case insensitive media type for the response. If not provided or allows all media types, If CSV output is desired, media type Examples:
|
Curl example
You may use the --insecure
flag in case self-signed certificates are used. Add Accept
header with value 'Accept: text/csv, application/json'
for CSV output.
...
Response Document
JSON output
An EventDetailsResponse
object with NavigationLinks
and list of EventDetails
matching request parameters is returned (see Swagger API models for additional information)
...
When accepting JSON media type and an error happens an ErrorResponse
object is returned (see Swagger API models)
...
With JSON, if the streaming has already started with status code 200 and an error happens during processing, an error
element may be included to the EventDetailsResponse
.
With CSV, an error after streaming has started causes just end of streaming.
...