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

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
logCollectionNamestringYesThe name of the Log Collection.

Query parameters

NameTypeRequiredConstraintsDescription
beginstringYesThe begin time of the search range.
endstringYesThe end time of the search range.
fieldsFilterstringNoA 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 |
limitintegerNoThe maximum number of Log Entries to return. If unspecified, the default value is 1000.
searchKeysstringYesOne or more search keys used to filter the result. Multiple search keys can be delimited with a comma.
skipintegerNoThe number of Log Entries to skip. If unspecified, the default value is 0.
sortBystringNoThe 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

PropertyTypeRequiredConstraintsDescription
beginstringNoformat: date-timeThe beginning of the time range for the records.
endstringNoformat: date-timeThe end of the time range for the records.
limitintegerNomin: 1The maximum number of Log Entries returned.
recordsarray<object>NoThe Log Entries.
Properties of records
PropertyTypeRequiredConstraintsDescription
createdAtstringNoformat: date-timeThe creation timestamp of the Log Entry.
eventKeystringNoThe event key of the Log Entry.
fieldsobjectNoThe fields of the Log Entry. The keys are the field names and the values are the field values.
searchKeysarray<string>NoThe search keys of the Log Entry.
timestampstringNoformat: date-timeThe timestamp of the Log Entry.
updatedAtstringNoformat: date-timeThe update timestamp of the Log Entry.
skipintegerNomin: 0The number of Log Entries skipped.
totalintegerNomin: 0The 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
}