# Logs

## List all logs

> \*\*API Key Scope\*\*: logs / index

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"logs_index":{"description":"List of logs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/log_collection"}}}}},"schemas":{"log_collection":{"type":"object","properties":{"count":{"type":"integer","readOnly":true},"logs":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/log"}}}},"log":{"type":"object","properties":{"id":{"type":"string"},"level":{"type":"string","enum":["trace","debug","info","warn","error","fatal"]},"msg":{"type":"string"},"time":{"type":"string","format":"date-time"},"hostname":{"type":"string"},"tag":{"type":"string","enum":["nodeum.dispatcher","nodeum.mover","nodeum.front","nodeum.monitoring","nodeum.scheduler"]},"error":{"type":"string"},"stacktrace":{"type":"string"}}}},"parameters":{"limit":{"name":"limit","in":"query","description":"The number of items to display for pagination.","schema":{"type":"integer"}},"offset":{"name":"offset","in":"query","description":"The number of items to skip for pagination.","schema":{"type":"integer"}},"filter_level":{"name":"level","in":"query","description":"Filter on task log level","schema":{"type":"string"}},"filter_time":{"name":"time","in":"query","description":"Filter on time","schema":{"type":"string"}},"filter_msg":{"name":"msg","in":"query","description":"Filter on message","schema":{"type":"string"}},"filter_hostname":{"name":"hostname","in":"query","description":"Filter on task log hostname","schema":{"type":"string"}},"filter_tag":{"name":"tag","in":"query","description":"Filter on task log tag","schema":{"type":"string"}}}},"paths":{"/logs":{"get":{"summary":"List all logs","operationId":"index_logs","description":"**API Key Scope**: logs / index","tags":["logs"],"responses":{"200":{"$ref":"#/components/responses/logs_index"}},"parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/filter_level"},{"$ref":"#/components/parameters/filter_time"},{"$ref":"#/components/parameters/filter_msg"},{"$ref":"#/components/parameters/filter_hostname"},{"$ref":"#/components/parameters/filter_tag"}]}}}}
```

## Displays the logs configuration.

> \*\*API Key Scope\*\*: configs / show

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"data_management_error":{"description":"Error returned from the data management.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/data_management_error"}}}}},"schemas":{"data_management_error":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"code":{"type":"integer","readOnly":true},"detail":{"type":"string","readOnly":true},"status":{"type":"string","readOnly":true}}}}},"paths":{"/logs/config":{"get":{"summary":"Displays the logs configuration.","operationId":"show_logs_config","description":"**API Key Scope**: configs / show","tags":["logs"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"./data_management/openapi.yaml#/components/schemas/Config_Logger"}}}},"default":{"$ref":"#/components/responses/data_management_error"}}}}}}
```

## Updates the existing logs configuration.

> \*\*API Key Scope\*\*: configs / update

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"unprocessable_entity":{"description":"The received resource was not correctly formatted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model_error"}}}},"data_management_error":{"description":"Error returned from the data management.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/data_management_error"}}}}},"schemas":{"model_error":{"type":"object","properties":{"details":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/attribute_error"}},"description":"Parsable objects describing the errors. The key is the invalid attribute name."},"messages":{"type":"array","description":"English description of the errors.","items":{"type":"string"}}}},"attribute_error":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"discriminator":{"propertyName":"error"}},"data_management_error":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"code":{"type":"integer","readOnly":true},"detail":{"type":"string","readOnly":true},"status":{"type":"string","readOnly":true}}}}},"paths":{"/logs/config":{"put":{"summary":"Updates the existing logs configuration.","operationId":"update_logs_config","description":"**API Key Scope**: configs / update","tags":["logs"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"./data_management/openapi.yaml#/components/schemas/Config_Logger"}}}},"422":{"$ref":"#/components/responses/unprocessable_entity"},"default":{"$ref":"#/components/responses/data_management_error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"./data_management/openapi.yaml#/components/schemas/Config_Logger"}}},"required":true}}}}}
```

## Clear all notifications

> \*\*API Key Scope\*\*: logs / post

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/logs/clear_notifications":{"post":{"summary":"Clear all notifications","operationId":"clear_notifications","description":"**API Key Scope**: logs / post","tags":["logs"],"responses":{"204":{"description":"Log notifications clear"}}}}}}
```
