- 3 minutes to read

Endpoint Direction

EndPointDirection is a mandatory number in every Log Event. It tells whether the Endpoint that logged the event receives or sends, one-way or two-way. Nodinite stores the Endpoint Direction on the Endpoint in the Repository Model, and you can filter on it in Log Views.

Repository Endpoints filtered on Direction
In the Repository Model, you can list Endpoints and filter them on Direction.

Reference

Value Direction Pattern Example
0 Receive One-way Receive a file from a folder
1 Send One-way Send a file to SFTP
10 Two-way Receive Request-response, your solution answers An API that serves incoming requests
11 Two-way Send Request-response, your solution calls A client calling a REST API; a call to a stored parameterized procedure
-1 Unknown Not known ⚠️ Avoid
-2 None No direction ⚠️ Avoid

Important

EndPointDirection is mandatory. ALWAYS include a value in the Log Event. If you leave it out, Nodinite 7 stores 0 (Receive), which is wrong for every sending Endpoint.

To get the current list for your version, call GET /LogAPI/api/LogEvent/EndPointDirection on the Log API; see Explore operations in Scalar or Swagger.

Scalar showing the GET /LogAPI/api/LogEvent/EndPointDirection operation (7.10)
Scalar shows the EndPointDirection operation with a code snippet and an example response.

Choosing a value

Nodinite Logging Agents set the Endpoint Direction for you. For custom logging, pick the value from the point of view of your integration solution:

  • Your solution picks up or receives a message and replies nothing: Receive (0).
  • Your solution delivers a message and expects no reply: Send (1).
  • Your solution exposes an API or service that others call and that returns a response: Two-way Receive (10).
  • Your solution calls an API, a service, or a stored procedure and gets a response back: Two-way Send (11).
  • Avoid Unknown (-1) and None (-2); they give your users nothing to filter on.

Endpoint Direction describes the Endpoint. To say where in the process the event was logged (before or after the port, inside the workflow), set the optional Event Direction too. The Event Directions page shows both values together in a file transfer and an API example.

Examples

A one-way file receive (Endpoint Type 60, File):

{
  "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"
}

A request sent by your solution to a REST API (two-way send, Endpoint Type 87, REST API):

{
  "LogAgentValueId": 42,
  "EndPointName": "INT102: Get Customer from CRM",
  "EndPointUri": "https://crm.contoso.com/api/customers",
  "EndPointDirection": 11,
  "EndPointTypeId": 87,
  "OriginalMessageTypeName": "https://contoso.com/CRM/1.0#GetCustomerRequest",
  "LogDateTime": "2017-11-22T08:44:22.309Z",
  "EventDirection": 22
}

Next Steps