---
title: Log API Scenarios – Protect and Log to the Nodinite Log API
description: "Hands-on scenarios for the Nodinite Log API: protect it with OAuth 2.0 in Microsoft Entra ID, and post Log Events from your own code or the Pickup Service."
---

# <i class="fal fa-list-ul" aria-hidden="true"></i> Log API Scenarios

These scenarios show how to set up and use the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Log API][] end to end, from protecting it to posting [Log Events][Log Event] from your own code.

![Scalar for the Log API: POST /LogAPI/api/LogEvent, Test Request, one Log Event for order ORD-31931 pasted, Send, 200 OK with the receipt, and a moment later the event in the Log View Contoso: Orders, animated walkthrough (7.12)][1]  
*Animated walkthrough: post one [Log Event][] for order ORD-31931 with **Test Request** in [Scalar][Explore operations in Scalar or Swagger] for the Log API. The answer is `200 OK` with the receipt, and a moment later the event shows in the [Log View][Log Views] *Contoso: Orders*.*  

## <i class="fal fa-book-open" aria-hidden="true"></i> Available Scenarios

| Scenario | What it solves |
| --- | --- |
| <i class="fal fa-shield-halved" aria-hidden="true"></i> [Protect the Log API with OAuth 2.0 and Entra ID][Protect Log API] | Require a bearer token on every Log Event. Register the Log API and one client per logging system in Microsoft Entra ID, turn on authentication in the Portal, and harden production so only approved clients, such as the [Pickup Service][], can log |
| <i class="fal fa-code" aria-hidden="true"></i> [Log using REST][] | Post Log Events from PowerShell, curl, C#, Python, or Node.js, to an unprotected or a protected Log API |
| <i class="fal fa-bolt" aria-hidden="true"></i> [Asynchronous Logging][] | Write Log Events to a queue or folder and let the [Pickup Service][] deliver them, so your application never waits for the Log API |

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>To automate other tasks than logging, such as maintaining the <a href="https://docs.nodinite.com/repository-model/overview/">Repository Model</a>, use the deterministic <a href="https://docs.nodinite.com/core-services/web-api/scenarios/overview/">Web API</a>.</p></div>
</aside>

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-shield-halved" aria-hidden="true"></i> [Protect the Log API with OAuth 2.0 and Entra ID][Protect Log API]  
* <i class="fal fa-code" aria-hidden="true"></i> [Log using REST][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-cloud-arrow-down" aria-hidden="true"></i> [Log API][]  
* <i class="fal fa-truck-pickup" aria-hidden="true"></i> [Pickup Log Events Service][Pickup Service]  
* <i class="fal fa-list-ul" aria-hidden="true"></i> [Web API Scenarios][]  
* <i class="fal fa-bolt" aria-hidden="true"></i> [Log Event][]  
* <i class="fal fa-clipboard-question" aria-hidden="true"></i> [Log API Troubleshooting][Troubleshooting]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/LogAPI/LogAPI_Scenarios_Hub.gif

[Asynchronous Logging]:https://docs.nodinite.com/core-services/log-api/features/asynchronous-logging/
[Explore operations in Scalar or Swagger]:https://docs.nodinite.com/core-services/log-api/features/log-using-rest/#explore-operations
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log using REST]:https://docs.nodinite.com/core-services/log-api/features/log-using-rest/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Pickup Service]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[Protect Log API]:https://docs.nodinite.com/core-services/log-api/scenarios/protect-the-log-api-with-oauth-2-0-and-entra-id/
[Repository Model]:https://docs.nodinite.com/repository-model/overview/
[Troubleshooting]:https://docs.nodinite.com/core-services/log-api/troubleshooting/overview/
[Web API Scenarios]:https://docs.nodinite.com/core-services/web-api/scenarios/overview/