Post custom log records
POST/projects/{projectId}/entities/{entityId}/customLogs/{customLogDefinitionId}/data
Base URL: https://api.tinkermode.com
Post custom log records. The client can use this method to inject log records.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user API key of a user with permission to create the entity custom log, a service account token with the same permission, or a project API key with admin permission.
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). |
Request body
Content type: application/json
Represents a custom log record.
An array of objects with the following shape:
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
entryId | string | Yes | read-only (server-generated) | Unique ID of the log record entry. |
eventKey | string | No | read-only (server-generated) | Event key of the log record. |
fields | object | Yes | read-only (server-generated) | An object of key-value pairs containing the log data. |
timestamp | string | Yes | read-only (server-generated) | Time in RFC3339 format. |
Request example
[
{
"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"
}
]