All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| logGet | GET /log | List events |
| logIdGet | GET /log/{id} | Get an event by id |
[Event] logGet(opts)
List events
Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. Logs record every API request. They are preserved for 15 days. You can also view logs in the Events section of the Dashboard.
import invoicetronicSdk from '@invoicetronic/js-sdk';
let defaultClient = invoicetronicSdk.ApiClient.instance;
// Configure HTTP basic authorization: Basic
let Basic = defaultClient.authentications['Basic'];
Basic.username = 'YOUR USERNAME';
Basic.password = 'YOUR PASSWORD';
let apiInstance = new invoicetronicSdk.LogApi();
let opts = {
'companyId': 56, // Number | Company id
'endpoint': "endpoint_example", // String |
'method': "method_example", // String |
'apiVerion': 56, // Number | Api version
'statusCode': 56, // Number | Response status code
'dateCreatedFrom': new Date("2013-10-20T19:20:30+01:00"), // Date | UTC ISO 8601 (2024-11-29T12:34:56Z)
'dateCreatedTo': new Date("2013-10-20T19:20:30+01:00"), // Date | UTC ISO 8601 (2024-11-29T12:34:56Z)
'page': 1, // Number | Page number.
'pageSize': 100, // Number | Items per page. Cannot be greater than 200.
'sort': "sort_example", // String | Sort by field. Prefix with '-' for descending order.
'query': "query_example", // String |
'success': true, // Boolean |
'dateTimeFrom': new Date("2013-10-20T19:20:30+01:00"), // Date | Date and time of the event
'dateTimeTo': new Date("2013-10-20T19:20:30+01:00"), // Date | Date and time of the event
'userAgent': "userAgent_example" // String |
};
apiInstance.logGet(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| companyId | Number | Company id | [optional] |
| endpoint | String | [optional] | |
| method | String | [optional] | |
| apiVerion | Number | Api version | [optional] |
| statusCode | Number | Response status code | [optional] |
| dateCreatedFrom | Date | UTC ISO 8601 (2024-11-29T12:34:56Z) | [optional] |
| dateCreatedTo | Date | UTC ISO 8601 (2024-11-29T12:34:56Z) | [optional] |
| page | Number | Page number. | [optional] [default to 1] |
| pageSize | Number | Items per page. Cannot be greater than 200. | [optional] [default to 100] |
| sort | String | Sort by field. Prefix with '-' for descending order. | [optional] |
| query | String | [optional] | |
| success | Boolean | [optional] | |
| dateTimeFrom | Date | Date and time of the event | [optional] |
| dateTimeTo | Date | Date and time of the event | [optional] |
| userAgent | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
Event logIdGet(id)
Get an event by id
Retrieve a log event by its internal id. Logs record every API request. They are preserved for 15 days. You can also view logs in the Events section of the Dashboard.
import invoicetronicSdk from '@invoicetronic/js-sdk';
let defaultClient = invoicetronicSdk.ApiClient.instance;
// Configure HTTP basic authorization: Basic
let Basic = defaultClient.authentications['Basic'];
Basic.username = 'YOUR USERNAME';
Basic.password = 'YOUR PASSWORD';
let apiInstance = new invoicetronicSdk.LogApi();
let id = 56; // Number | Item id
apiInstance.logIdGet(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Item id |
- Content-Type: Not defined
- Accept: application/json