---
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."
---

# :fa-list-ul: Log API Scenarios

These scenarios show how to set up and use the :Nodinite: [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*.*  

## :fa-book-open: Available Scenarios

| Scenario | What it solves |
| --- | --- |
| :fa-shield-halved: [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 |
| :fa-code: [Log using REST][] | Post Log Events from PowerShell, curl, C#, Python, or Node.js, to an unprotected or a protected Log API |
| :fa-bolt: [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 |

>[!TIP]
>To automate other tasks than logging, such as maintaining the [Repository Model][], use the deterministic [Web API][Web API Scenarios].

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

* :fa-shield-halved: [Protect the Log API with OAuth 2.0 and Entra ID][Protect Log API]  
* :fa-code: [Log using REST][]  

## :fa-link-horizontal: Related Topics

* :fa-cloud-arrow-down: [Log API][]  
* :fa-truck-pickup: [Pickup Log Events Service][Pickup Service]  
* :fa-list-ul: [Web API Scenarios][]  
* :fa-bolt: [Log Event][]  
* :fa-clipboard-question: [Log API Troubleshooting][Troubleshooting]  

[1]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/LogAPI_Scenarios_Hub.gif

[Asynchronous Logging]:{ndr}/Core%20Services/Log%20API/Features/Asynchronous%20Logging.md
[Explore operations in Scalar or Swagger]:{ndr}/Core%20Services/Log%20API/Features/Log%20using%20REST.md#explore-operations
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.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
[Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[Protect Log API]:{ndr}/Core%20Services/Log%20API/Scenarios/Protect%20the%20Log%20API%20with%20OAuth%202.0%20and%20Entra%20ID.md
[Repository Model]:{ndr}/Repository%20Model/Overview.md
[Troubleshooting]:{ndr}/Core%20Services/Log%20API/Troubleshooting/Overview.md
[Web API Scenarios]:{ndr}/Core%20Services/Web%20API/Scenarios/Overview.md