---
title: "JSON Log Event Field Reference: Details, Payload, Context, and Examples"
description: "Field reference for the JSON formatted Nodinite Log Event: every details field with type, required flag, example, and meaning, the Body and Bodies payload fields, the Context collection, and minimal and full JSON examples."
---

# JSON formatted Log Event

This page lists every field of a **JSON formatted** [Log Event][]: the details, the payload (`Body` or `Bodies`), and the `Context` collection. For what the three parts are and what :Nodinite: does with them, see [Log Event][]. To send the JSON, post it to the [Log API][] ([Log using REST][]) or write it to a queue, folder, or table for the [Pickup Log Events Service Logging Agent][Pickup Service] ([Asynchronous Logging][], recommended).

To extract values from a Log Event into a [Search Field][Search Fields], use the [Formula][] functions [body][], [context][], and [field][].

![The Minimal and the Full Example posted to the Log API in Scalar, then both events in a Log View, animated walkthrough (7.12)][1]  
*Animated walkthrough: in the [Log API][]'s Scalar reference, **Test Request** on `POST /LogAPI/api/LogEvent` sends the [Minimal Example](#minimal-example) and then the [Full Example](#full-example); each answers **200 OK**. A [Log View][Log Views] shows both events: the Minimal one without Log Text, the Full one with *File OK*. The walkthrough sends the current time as `LogDateTime`, so the events fall inside the search.*  

## :fa-table: Reference

### :fa-bolt: Details {#details}

The first seven fields are mandatory. All other fields are optional: set them to `null` or omit them. The more details you provide, the better the experience for :Nodinite: users.

:Nodinite: [Log Agents][] that create Log Events, such as the BizTalk and Logic Apps agents, set most of these fields for you, and logging frameworks such as [Serilog][] let you control what is logged. A custom logging solution sets them itself.

The `number` fields `LogAgentValueId`, `LogStatus`, `SequenceNo`, `EventNumber` and `ProcessingTime` also accept the number as a string, for example `"-1337"`. The three enum fields `EndPointDirection`, `EndPointTypeId` and `EventDirection` don't: send them as JSON numbers.

|Field|Required|Type|Example|Meaning|
|---|---|---|---|---|
|<span id="logagentvalueid"></span>`LogAgentValueId`|✅ Yes|`number`|`42`|Who sent the data: the [Log Agent][Log Agents]|
|<span id="endpointname"></span>`EndPointName`|✅ Yes|`string`|`"INT101: Receive Hello World Log Events"`|Name of the [Endpoint][Endpoints] transport|
|<span id="endpointuri"></span>`EndPointUri`|✅ Yes|`string`|`"C:\\DropArea\\in"`|[URI][]<sup>:fa-arrow-up-right-from-square:</sup> of the [Endpoint][Endpoints] transport|
|<span id="endpointdirection"></span>[`EndPointDirection`][Endpoint Directions]|✅ Yes|`number`|`0`|Direction of the [Endpoint][Endpoints] transport; see [Endpoint Directions][]. If you leave it out, :Nodinite: 7 stores `0` (Receive).|
|<span id="endpointtypeid"></span>[`EndPointTypeId`][Endpoint Types]|✅ Yes|`number`|`60`|Type of the [Endpoint][Endpoints] transport; see [Endpoint Types][]|
|<span id="originalmessagetypename"></span>`OriginalMessageTypeName`|✅ Yes|`string`|`"https://nodinite.com/Customers/1.0#Batch"`|Name of the [Message Type][Message Types]. It decides which [Search Field Expressions][] run on the event (see the [processing pipeline][Log Event Pipeline]).|
|<span id="logdatetime"></span>`LogDateTime`|✅ Yes|`string`|`"2018-05-03T13:37:00.123Z"`|When the event happened at the client, with a time zone; see the note below the table|
|<span id="eventdirection"></span>[`EventDirection`][Event Directions]|No|`number`|`17`|Where in the process the event happened, e.g. `17` External Incoming (before the receive port); see [Event Directions][]|
|<span id="processinguser"></span>`ProcessingUser`|No|`string`|`"DOMAIN\\user"`|Identity that logged the event|
|<span id="sequenceno"></span>`SequenceNo`|No|`number`|`0`|Your own sequence number; reset it on each logical interchange|
|<span id="eventnumber"></span>`EventNumber`|No|`number`|`0`|Your own event number; in batched operations, unique for each event in the batch|
|<span id="logtext"></span>`LogText`|No|`string`|`"File successfully generated"`|Your log text|
|<span id="applicationinterchangeid"></span>`ApplicationInterchangeId`|No|`string`|`""`|Id for the application scope|
|<span id="localinterchangeid"></span>`LocalInterchangeId`|No|`guid`|`null`|Id for the local scope|
|<span id="logstatus"></span>[`LogStatus`][Log Status Codes]|No|`number`|`0`|Status code, as defined for each [Log Agent][Log Agents]; see [Log Status Codes][]. [LogStatusCodeAutoSyncPolicy][] controls whether incoming events create or update the definitions.|
|<span id="processname"></span>`ProcessName`|No|`string`|`"My customer process"`|Name of the process|
|<span id="processingmachinename"></span>`ProcessingMachineName`|No|`string`|`"localhost"`|Name of the server where the Log Event originated|
|<span id="processingmodulename"></span>`ProcessingModuleName`|No|`string`|`"INT101-HelloHappyCustomers-Application"`|Name of the module|
|<span id="processingmoduletype"></span>`ProcessingModuleType`|No|`string`|`"FilePickup"`|Type of the module, such as exe, dll, or service|
|<span id="serviceinstanceactivityid"></span>`ServiceInstanceActivityId`|No|`guid`|`null`|Id for the run scope|
|<span id="processingtime"></span>`ProcessingTime`|No|`number`|`80`|Flow execution time so far, in milliseconds|

:Nodinite: also calls the details fields *Additional field values*.

#### LogDateTime and Time Zones

Include the time zone in `LogDateTime`: `Z` for UTC, or an offset such as `+02:00` or `-01:00`, e.g. `"2017-04-10T08:44:22.309+02:00"` (+02:00 against UTC). Without a time zone, :Nodinite: assumes UTC. :Nodinite: always stores `LogDateTime` as UTC and shows each user the correct local time.

#### GUID Values

Send a [guid](https://en.wikipedia.org/wiki/Universally_unique_identifier)<sup>:fa-arrow-up-right-from-square:</sup> without braces, e.g. `"064205E2-F7CF-43A6-B514-4B55536C2B67"`, or `null`.

### :fa-envelope: Payload {#payload}

The payload is optional. It is a single message (the default, `Body`) or several messages, such as email attachments (`Bodies`). Each body is a [base64 encoded](https://www.base64encode.org/)<sup>:fa-arrow-up-right-from-square:</sup> string or file. Omit the field when you have no payload to log. [Character Encoding][] explains how :Nodinite: decodes the text of a body.

|Field|Required|Type|Example|Meaning|
|---|---|---|---|---|
|<span id="body"></span>`Body`|No|`string`|`"SGVsbG8gV29ybGQ="`|One base64 encoded payload, or `null`. The [Logging Service][] doesn't process a body larger than [MessageProcessingMaxBodySize][] (MB).|
|<span id="bodies"></span>`Bodies`|No|`array` of `string`|`["SGVsbG8=", "V29ybGQ="]`|Several base64 encoded payloads. You can send `Body` and `Bodies` together: :Nodinite: stores `Body` first, then every non-empty entry of `Bodies`. Each body gets its own **View message body** entry in the [Log View][Log Views]'s **Action** menu (**View message body**, **View message body #1**, ...).|

### :fa-key: Context {#context}

The context is a collection of key/value pairs with string values. Send whatever you need to build self-service [Log Views][] for your [Users][]: [Search Field Expressions][] can extract values from the context too. Omit the field when you have no context properties to log. [ContextPropertiesFilters][] removes context properties by name (for example, passwords) and [ProtectedContextValues][] masks their values in [Log Views][].

|Field|Required|Type|Example|Meaning|
|---|---|---|---|---|
|`Context`|No|`object`|`{"Key1": "ABC", "Key2": "123"}`|Key/value pairs; every value is a JSON string. A number, `true` or an object as a value is refused: send `"42"`, not `42`.|

Fragment of a Log Event, showing only the `Context` field:

```json
{
  "Context": {
    "CorrelationId": "064205E2-F7CF-43A6-B514-4B55536C2B67",
    "FileName": "\\\\server\\share\\NodiniteHappyCustomerList.txt"
  }
}
```

Keys that start with `ExtendedProperties/1.0#` are [Context Options][]: they change how the [Logging Service][] processes the event, such as overriding the Message Type or the encoding. With [Repository Binding][], the context also populates the [Repository Model][] while the event is processed; this works only when the [AllowRepositoryAutomapping][] [System Parameter][System Parameters] is set to `true`.

## :fa-code: Examples

### Minimal Example {#minimal-example}

An incoming Log Event with only the mandatory fields (the Endpoint is file-based in this example):

```json
{
  "LogAgentValueId": 42,
  "EndPointName": "INT101: Receive Hello World Log Events",
  "EndPointUri": "C:\\temp\\in",
  "EndPointDirection": 0,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "Hello.World.File/1.0",
  "LogDateTime": "2017-11-22T08:44:22.309Z"
}
```

An event without `Body` and without `Context` is stored and shows in a [Log View][Log Views] with its Endpoint and Message Type, but the [Logging Service][] doesn't process it: no [Search Field][Search Fields] values, no [Context Options][], no [Repository Binding][].

### Full Example {#full-example}

A Log Event with every field set, mandatory and optional:

```json
{
  "LogAgentValueId": 42,
  "EndPointName": "INT101: Receive Hello World Log Events",
  "EndPointUri": "C:\\temp\\in",
  "EndPointDirection": 0,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "Hello.World.File/1.0",
  "LogDateTime": "2017-11-22T08:44:22.309Z",
  "EventDirection": 17,
  "ProcessingUser": "DOMAIN\\user",
  "SequenceNo": 0,
  "EventNumber": 0,
  "LogText": "File OK",
  "ApplicationInterchangeId": "",
  "LocalInterchangeId": null,
  "LogStatus": 0,
  "ProcessName": "My Process",
  "ProcessingMachineName": "localhost",
  "ProcessingModuleName": "INT101-HelloWorld-Application",
  "ProcessingModuleType": "FilePickup",
  "ServiceInstanceActivityId": null,
  "ProcessingTime": 80,
  "Body": "SGVsbG8gV29ybGQ=",
  "Context": {
    "CorrelationId": "064205E2-F7CF-43A6-B514-4B55536C2B67",
    "FileName": "Hello.txt"
  }
}
```

![The Full Example's details in a Log View: the details fields, the Context Values tab and the decoded Body, animated walkthrough (7.12)][2]  
*Animated walkthrough: **Show Details** on the Full Example in a [Log View][Log Views] shows Log Text, Endpoint, Message Type and when it happened. **Context Values (2)** lists `CorrelationId` and `FileName` as sent, and **Action** → **View message body** shows the Body `SGVsbG8gV29ybGQ=` decoded: *Hello World* (11 bytes).*  

### Multiple Bodies Example {#bodies-example}

The minimal Log Event with two payloads in `Bodies` instead of `Body`:

```json
{
  "LogAgentValueId": 42,
  "EndPointName": "INT101: Receive Hello World Log Events",
  "EndPointUri": "C:\\temp\\in",
  "EndPointDirection": 0,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "Hello.World.File/1.0",
  "LogDateTime": "2017-11-22T08:44:22.309Z",
  "Bodies": ["SGVsbG8=", "V29ybGQ="]
}
```

![The Multiple Bodies Example posted in Scalar, then each body opened from the Log View's Action menu, animated walkthrough (7.12)][3]  
*Animated walkthrough: the event with two `Bodies` gets two entries in the [Log View][Log Views]'s **Action** menu: **View message body** shows *Hello*, and **View message body #1** shows *World*.*  

## :fa-hand-point-right: Next Steps

* :fa-cloud-arrow-down: [Log using REST][]  
* :fa-truck-pickup: [Asynchronous Logging][]  
* :fa-tags: [Context Options][]  
* :fa-sitemap: [Repository Binding][]  

## :fa-link-horizontal: Related Topics

* :fa-bolt: [Log Event][]  
* :fa-diamond-turn-right: [Endpoint Directions][]  
* :fa-plug: [Endpoint Types][]  
* :fa-arrows-left-right: [Event Directions][]  
* :fa-language: [Character Encoding][]  
* :fa-flag: [Log Status Codes][]  
* :fa-sign-in-alt: [Endpoints][]  
* :fa-file: [Message Types][]  
* :fa-box-archive: [Log Agents][]  
* :fa-hard-drive: [Logging Service][]  
* :fa-search: [Log Views][]  
* :fa-database: [Log Databases][]  
* :fa-cloud-arrow-down: [Log API][]  

[1]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/JsonLogEvent_MinimalAndFull.gif
[2]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/JsonLogEvent_FullDetails.gif
[3]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/JsonLogEvent_MultipleBodies.gif

[AllowRepositoryAutomapping]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/AllowRepositoryAutomapping.md
[Asynchronous Logging]:{ndr}/Core%20Services/Log%20API/Features/Asynchronous%20Logging.md
[body]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Source/body.md
[Character Encoding]:{ndr}/Core%20Services/Log%20Event/Features/Character%20Encoding.md
[context]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Source/context.md
[Context Options]:{ndr}/Core%20Services/Log%20Event/Features/Context%20Options.md
[ContextPropertiesFilters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/ContextPropertiesFilters.md
[Endpoint Directions]:{ndr}/Core%20Services/Log%20Event/Features/Endpoint%20Directions.md
[Endpoint Types]:{ndr}/Core%20Services/Log%20Event/Features/Endpoint%20Types.md
[Endpoints]:{ndr}/Repository%20Model/Endpoints/Overview.md
[Event Directions]:{ndr}/Core%20Services/Log%20Event/Features/Event%20Directions.md
[field]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Source/field.md
[Formula]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Overview.md
[Log Agents]:{ndr}/Administration/1.%20Log%20Management/3.%20Log%20Agents/Features/What%20is%20a%20Log%20Agent.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Event Pipeline]:{ndr}/Core%20Services/Log%20Event/Overview.md#what-happens-after-you-log-an-event
[Log Status Codes]:{ndr}/Administration/1.%20Log%20Management/3.%20Log%20Agents/Features/What%20is%20a%20Log%20Status%20Code.md
[Log using REST]:{ndr}/Core%20Services/Log%20API/Features/Log%20using%20REST.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[LogStatusCodeAutoSyncPolicy]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/LogStatusCodeAutoSyncPolicy.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[MessageProcessingMaxBodySize]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/MessageProcessingMaxBodySize.md
[Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[ProtectedContextValues]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/ProtectedContextValues.md
[Repository Binding]:{ndr}/Core%20Services/Log%20Event/Features/Repository%20Binding.md
[Repository Model]:{ndr}/Repository%20Model/Overview.md
[Search Field Expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md
[Search Fields]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[Serilog]:{ndr}/Logging%20and%20Monitoring/Serilog/Overview.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md
[URI]:https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
[Users]:{ndr}/Administration/3.%20Access%20Management/2.%20Users/Features/What%20is%20a%20User.md