Get Log Entries
GET/projects/{projectId}/customLogs/{logCollectionName}/data
Base URL: https://api.tinkermode.com
Retrieves Log Entries of a given Log Collection using the provided filters.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. | |
logCollectionName | string | Yes | The name of the Log Collection. |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
begin | string | Yes | The begin time of the search range. | |
end | string | Yes | The end time of the search range. | |
fieldsFilter | string | No | A filter string starting with a conjunction. Supported conjunctions are AND() and OR().
A conjunction takes a comma-separated condition string like AND(group==="group_1",maxSpeed<5).
Each condition string defines a filter for the field value. The left-hand side must be a valid field name.
The right-hand side must be a value condition. For example, group==="group_1" matches any records that
the group field value exactly matches "group_1". Supported operators are following:
| Operator | |
| --- | --- |
| === | exact match |
| == | substring match |
| ~== | included in array as exact match. name~==["john"|"jeff"|"jack"] matches one of the three. |
| ~= | included in array as substring match. name~=["j"|"e"] matches "john", "jeff", "jack", and "ethan". |
| < | less than |
| <= | less than or equal to |
| > | greater than |
| >= | greater than or equal to |
| |
limit | integer | No | The maximum number of Log Entries to return. If unspecified, the default value is 1000. | |
searchKeys | string | Yes | One or more search keys used to filter the result. Multiple search keys can be delimited with a comma. | |
skip | integer | No | The number of Log Entries to skip. If unspecified, the default value is 0. | |
sortBy | string | No | The sort order of the Log Entries in the format field:order (e.g. timestamp:desc).
Currently, only the timestamp field is supported. The default order is ascending.
|
Responses
200 Successfully retrieved Log Entries.
Content type: application/json
| Property | Type | Required | Constraints | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
begin | string | No | format: date-time | The beginning of the time range for the records. | |||||||||||||||||||||||||||||||||||
end | string | No | format: date-time | The end of the time range for the records. | |||||||||||||||||||||||||||||||||||
limit | integer | No | min: 1 | The maximum number of Log Entries returned. | |||||||||||||||||||||||||||||||||||
records | array<object> | No | The Log Entries. | ||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
skip | integer | No | min: 0 | The number of Log Entries skipped. | |||||||||||||||||||||||||||||||||||
total | integer | No | min: 0 | The total number of Log Entries available. | |||||||||||||||||||||||||||||||||||
Response example
{
"begin": "2024-01-01T00:00:00Z",
"end": "2024-01-02T00:00:00Z",
"limit": 1000,
"records": [
{
"createdAt": "2024-01-01T09:30:00.000Z",
"eventKey": "foo_event",
"fields": {
"bar": "baz",
"foo": 1,
"qux": true
},
"searchKey": "",
"searchKeys": [
"bar"
],
"timestamp": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T09:30:00.000Z"
}
],
"skip": 0,
"total": 1
}