Get custom log data
GET/projects/{projectId}/entities/{entityId}/customLogs/{customLogDefinitionId}/data
Base URL: https://api.tinkermode.com
Get the custom log data.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user API key of a user with permission to read the entity custom log, a service account token with the same permission, or a project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. | |
entityId | string | Yes | Entity ID (unique within project) | |
customLogDefinitionId | string | Yes | Custom log definition ID (unique within entity class). |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
begin | string | Yes | The beginning time of the data entries. The format follows RFC3339. | |
end | string | Yes | The end time of the data entries. The format follows RFC3339. | |
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 | default: 1000; min: 1; max: 1000 | Maximum number of log records to return. |
skip | integer | No | default: 0; min: 0 | Number of log records to skip over. |
sortBy | string | No | The sort order of the log records in the format field:order (e.g. timestamp:desc).
Currently, only the timestamp field is supported. The default order is ascending.
|
Responses
200 The requested custom log records are returned.
Content type: application/json
| Property | Type | Required | Constraints | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
begin | string | No | read-only (server-generated) | The begin time of data entries. The format follows RFC3339. | |||||||||||||||||||||||||
end | string | No | read-only (server-generated) | The end time of data entries. The format follows RFC3339. | |||||||||||||||||||||||||
limit | integer | No | read-only (server-generated) | The maximum number of data entries to be fetched. | |||||||||||||||||||||||||
records | array<object> | No | read-only (server-generated) | Log entries. Each entry is a log record object. | |||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
skip | integer | No | read-only (server-generated) | Number of data entries skipped over. | |||||||||||||||||||||||||
total | integer | No | read-only (server-generated) | The total number of data entries for the query. | |||||||||||||||||||||||||
Response example
{
"begin": "2022-03-01T00:00:00.000Z",
"end": "2022-03-31T23:59:59.999Z",
"limit": 1000,
"records": [
{
"eventKey": "20220317012345678-1",
"fields": {
"result_code": "100",
"tester_model": "MODE-123",
"value": 0.3
},
"timestamp": "2022-03-17T01:23:45.678Z"
},
{
"eventKey": "20220317012345678-2",
"fields": {
"result_code": "000",
"tester_model": "MODE-123",
"value": 0
},
"timestamp": "2022-03-18T01:23:45.678Z"
}
],
"skip": 0,
"total": 210
}