- 7 minutes to read

Log API FAQ and Troubleshooting guide

Unlock the full potential of your Nodinite Log API with this comprehensive FAQ and troubleshooting guide. Here you'll find solutions to common problems, configuration tips, and best practices for logging business transactions and events.

  • ✅ Fast solutions to common Log API errors and configuration issues
  • ✅ Supported protocols and flexible integration options
  • ✅ Guidance for logging business transactions and events
  • ✅ Direct contact details for expert support

Scalar for the Log API: a Log Event without LogDateTime sent to POST /LogAPI/api/LogEvent/Validate gets 400 Bad Request naming the field; with LogDateTime added the answer is 200 OK with Status 0, animated walkthrough (7.12)
Animated walkthrough: check a Log Event with Validate before you send it. The first try misses LogDateTime and gets 400 Bad Request with the field named; the fixed event gets 200 OK and Status: 0. See How do I check a Log Event before I send it?

What IIS App Pool settings does the LogAPI require

None that you set by hand. In Nodinite v7 the installation CLI creates the Log API IIS web site and its application pool from the values in the Nodinite Portal: the port and service account under Step 4: Servers › Core platform services, and the TLS certificate under Core host Configuration. To change them, change the Portal values and update the environment. If someone has changed the settings directly in IIS, restore them with IIS Authentication settings: the Log API uses Anonymous Authentication and a named service account.

I'm getting a GRANT EXECUTE Error

You are most likely missing some SQL access rights for the Log API service account. Review the SQL rights in the Prerequisites, and add the account to the LogServiceUsers System Parameter so it also gets access to new Log Databases.

Cannot read configuration file due to insufficient permissions

If you encounter a 'Cannot read configuration file due to insufficient permissions', follow the linked guide to resolve file permission issues.

Does the Log API support Swagger?

Yes. Open Swagger at the root of the Log API web site, for example https://nodinite.contoso.com:40002/swagger. It lists every operation of the RESTful API with its models, and lets you send test requests.

Swagger with the LogEvent group expanded: four POST operations for Log Events, batches and validation, and three GET operations for Endpoint Types, Endpoint Direction and Event Direction (7.12)
Swagger lists the operations to post and validate Log Events and batches, and to read the valid Endpoint Types, Endpoint Directions, and Event Directions.

Note

Swagger may be removed in a future version. Use Scalar for new work.

Does the Log API support Scalar?

Yes. Open Scalar at https://nodinite.contoso.com:40002/scalar. Besides browsing operations and sending test requests, Scalar generates code snippets in many languages for each operation, such as the Log Event post. Add authentication yourself when the Log API is protected.

Scalar showing POST /LogAPI/api/LogEvent with a generated code snippet (7.12)
Scalar shows a sample Log Event payload, a code snippet, and the responses for each status code.

What is the Log API base URL?

In Nodinite v7, each environment's Log API is its own IIS web site with its own port, which is set in the Nodinite Portal (Servers step). The base URL ends in /LogAPI/, for example https://nodinite.contoso.com:40002/LogAPI/, and a Log Event is posted to https://nodinite.contoso.com:40002/LogAPI/api/LogEvent. Scalar and Swagger are at the root of the site, without /LogAPI/. See Find the base URL.

Why do I get 401 Unauthorized from the Log API?

Enable Authentication is checked for the Log API in the Portal, so every request needs an OAuth 2.0 bearer token. Request the token with the client credentials grant and the scope api://<logapi-client-id>/.default. Check that the Log API Audiences contain the plain logApi Application (client) ID, and that logApi issues version 2 tokens: a token with the issuer https://sts.windows.net/... is a version 1 token and is rejected. In the Pickup Service, check Protected on the Destination tab. See Protect the Log API with OAuth 2.0 and Entra ID.

Can I still log using WCF?

No. The WCF endpoints are not available in Nodinite v7. Use REST or the Pickup Service. See Logging using the WCF Log API for a migration table.

How do I check a Log Event before I send it?

Post it to api/LogEvent/Validate (or api/LogEvent/Batch/Validate for a batch). The Log API runs the same checks as a real post and stores nothing.

  • 200 OK with Status: 0 and ErrorMessage: null: the event is valid. Post it to api/LogEvent.
  • 400 Bad Request with Status: 1: the answer names each field that failed and why, for example The LogDateTime field is required. Fix the event and validate again.

Validate works while the Logging Service is stopped, because the Log API doesn't need it to check or store events.

  1. Open Scalar for the Log API and pick POST /LogAPI/api/LogEvent/Validate.
  2. Click Test Request and paste your Log Event.
  3. Click Send and read the answer.
  4. Fix any field the answer names, and send again until you get 200 OK.

What kind of data can I send using the Log API?

The primary purpose is logging Business Transactions. With Nodinite, you can provide self-service access to business-critical data with role-based access for your stakeholders. Apply smart filters (restrictions) to avoid potentially sensitive data from messages being revealed. Always log data for a specific business or compliance reason.

The fields are described in JSON Log Event:

  • Event - Generic information about the event (like time, message type name and endpoint) - WHEN, HOW.
    • Payload - The business transaction with data, usually XML, JSON, flatfile like EDI/X12 or zip file - WHAT.
    • Context Properties - Key value based collection of arbitrary data - (for example InvoiceId and CorrelationId) - WHAT.
      • With the powerful Nodinite Context Options, you can control the behaviour of how Nodinite processes events.
graph TD subgraph "Event" subgraph "Details" roED[fal:fa-bolt Event Details
LogDateTime = 2018-05-03 13:37:00+02:00
EndPoint = https://api.nodinite.com/...
MessageType=Invoice
...] end subgraph "Payload" ro[fal:fa-envelope Message
base64EncodedMessage] end subgraph "Context Properties" roKey[fal:fa-key Key Values
InvoiceNo = 123
CorrelationId=456
...] end end

Illustration: Log Event structure with details, payload, and context properties in Nodinite.

Even though Nodinite manages large messages (we have seen at least 5.5 GB payloads in real-world customer environments), the Log API has its limitations due to being an API. If you need large messaging support, contact our support for guidance on how to properly manage your specific use case.

Which System Parameters affect the Log API?

The Log API reads only the SqlServer System Parameter, to find the SQL Server that hosts the databases. Parameters such as ContextPropertiesFilters, MessageProcessingMaxBodySize, and MissingEventsDays change what happens to your Log Events after the Log API has stored them; the Logging Service reads them. See What happens after the Log API accepts an event.

What protocols are supported?

The Log API is a REST API over HTTPS. WCF is not available in Nodinite v7 (see Can I still log using WCF?). See the Hardening guide for supported protocols and security recommendations. The TLS host name and certificate of the Log API are set in the Portal under Core host Configuration.

If the browser returns that the certificate is not secure, the Log API will not work (since it is not operational).
Not a valid cert
Example: Browser warning for an invalid certificate prevents Log API operation.

How can I send events and data to the Log API?

You can write your own code to invoke the Log API. Below are your main options, each detailed individually:

Tip

Other asynchronous options are available, such as posting a Log Event to the filesystem or, even better, to various queues. Use this in combination with the Nodinite Pickup Log Events Service Logging Agent to eliminate dependency on Nodinite availability—giving you the freedom to update Nodinite whenever you want. See Asynchronous Logging.

sequenceDiagram Your Application->>Queue: Create and Send Log Event loop Periodic check and loop While Log Events Exists alt Run Pickup Service->>Queue: Get Log Events from Queue Queue->>Pickup Service: Read Message Pickup Service->>Log API: Send Log Event Log API->>Pickup Service: ACK/NACK (or Exception) Pickup Service->>Queue: Remove Message else Failed Pickup Service->>Queue: Return Message end end

Illustration: Asynchronous event delivery using Pickup Service and queues for robust, decoupled logging.

Which Log Agents use the Log API?

Any client that posts the JSON Log Event uses the Log API; it has no special handling per agent. These Log Agents use it:

Nodinite Log Agents can manage situations where the Nodinite Log API is unavailable (such as during updates, service windows, or database outages). The Nodinite Log Agents will resume operation automatically whenever the Log API comes back online and is operational.

Contact our support

If you still have questions or encounter issues with the Log API, don't hesitate to contact us, read more on the Support page.

Next Steps