# Error Log

## GET /api/v1/dashboard/error-log/

> API view for logging errors.\
> \
> Args:\
> &#x20;   request: The HTTP request object.\
> \
> Returns:\
> &#x20;   CustomResponse: The response object containing formatted error logs.\
> \
> Raises:\
> &#x20;   IOError: If there is an error reading the error log file.\
> \
> Examples:\
> &#x20;   \>>> logger\_api = LoggerAPI()\
> &#x20;   \>>> response = logger\_api.get(request)

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/":{"get":{"operationId":"dashboard_error_log_retrieve","description":"API view for logging errors.\n\nArgs:\n    request: The HTTP request object.\n\nReturns:\n    CustomResponse: The response object containing formatted error logs.\n\nRaises:\n    IOError: If there is an error reading the error log file.\n\nExamples:\n    >>> logger_api = LoggerAPI()\n    >>> response = logger_api.get(request)","tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## PATCH /api/v1/dashboard/error-log/

> API view for logging errors.\
> \
> Args:\
> &#x20;   request: The HTTP request object.\
> \
> Returns:\
> &#x20;   CustomResponse: The response object containing formatted error logs.\
> \
> Raises:\
> &#x20;   IOError: If there is an error reading the error log file.\
> \
> Examples:\
> &#x20;   \>>> logger\_api = LoggerAPI()\
> &#x20;   \>>> response = logger\_api.get(request)

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/":{"patch":{"operationId":"dashboard_error_log_partial_update","description":"API view for logging errors.\n\nArgs:\n    request: The HTTP request object.\n\nReturns:\n    CustomResponse: The response object containing formatted error logs.\n\nRaises:\n    IOError: If there is an error reading the error log file.\n\nExamples:\n    >>> logger_api = LoggerAPI()\n    >>> response = logger_api.get(request)","tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/v1/dashboard/error-log/{log\_name}/

>

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/{log_name}/":{"get":{"operationId":"dashboard_error_log_retrieve_2","parameters":[{"in":"path","name":"log_name","schema":{"type":"string"},"required":true}],"tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/v1/dashboard/error-log/clear/{log\_name}/

>

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/clear/{log_name}/":{"post":{"operationId":"dashboard_error_log_clear_create","parameters":[{"in":"path","name":"log_name","schema":{"type":"string"},"required":true}],"tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/v1/dashboard/error-log/graph/

> A class representing the ErrorGraphAPI view.\
> \
> This view handles the GET request to retrieve formatted error data including a heatmap of URL hits,\
> incident information, and affected users. It requires authentication and specific roles to access.\
> \
> Args:\
> &#x20;   self: The instance of the class itself.

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/graph/":{"get":{"operationId":"dashboard_error_log_graph_retrieve","description":"A class representing the ErrorGraphAPI view.\n\nThis view handles the GET request to retrieve formatted error data including a heatmap of URL hits,\nincident information, and affected users. It requires authentication and specific roles to access.\n\nArgs:\n    self: The instance of the class itself.","tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/v1/dashboard/error-log/patch/{error\_id}/

> API view for logging errors.\
> \
> Args:\
> &#x20;   request: The HTTP request object.\
> \
> Returns:\
> &#x20;   CustomResponse: The response object containing formatted error logs.\
> \
> Raises:\
> &#x20;   IOError: If there is an error reading the error log file.\
> \
> Examples:\
> &#x20;   \>>> logger\_api = LoggerAPI()\
> &#x20;   \>>> response = logger\_api.get(request)

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/patch/{error_id}/":{"get":{"operationId":"dashboard_error_log_patch_retrieve","description":"API view for logging errors.\n\nArgs:\n    request: The HTTP request object.\n\nReturns:\n    CustomResponse: The response object containing formatted error logs.\n\nRaises:\n    IOError: If there is an error reading the error log file.\n\nExamples:\n    >>> logger_api = LoggerAPI()\n    >>> response = logger_api.get(request)","parameters":[{"in":"path","name":"error_id","schema":{"type":"string"},"required":true}],"tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## PATCH /api/v1/dashboard/error-log/patch/{error\_id}/

> API view for logging errors.\
> \
> Args:\
> &#x20;   request: The HTTP request object.\
> \
> Returns:\
> &#x20;   CustomResponse: The response object containing formatted error logs.\
> \
> Raises:\
> &#x20;   IOError: If there is an error reading the error log file.\
> \
> Examples:\
> &#x20;   \>>> logger\_api = LoggerAPI()\
> &#x20;   \>>> response = logger\_api.get(request)

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/patch/{error_id}/":{"patch":{"operationId":"dashboard_error_log_patch_partial_update","description":"API view for logging errors.\n\nArgs:\n    request: The HTTP request object.\n\nReturns:\n    CustomResponse: The response object containing formatted error logs.\n\nRaises:\n    IOError: If there is an error reading the error log file.\n\nExamples:\n    >>> logger_api = LoggerAPI()\n    >>> response = logger_api.get(request)","parameters":[{"in":"path","name":"error_id","schema":{"type":"string"},"required":true}],"tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/v1/dashboard/error-log/tab/

> A class representing the ErrorTabAPI view.\
> \
> This view handles the GET request to retrieve grouped URL patterns based on user roles.\
> It requires authentication and specific roles to access.\
> \
> Args:\
> &#x20;   self: The instance of the class itself.

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/tab/":{"get":{"operationId":"dashboard_error_log_tab_retrieve","description":"A class representing the ErrorTabAPI view.\n\nThis view handles the GET request to retrieve grouped URL patterns based on user roles.\nIt requires authentication and specific roles to access.\n\nArgs:\n    self: The instance of the class itself.","tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/v1/dashboard/error-log/view/{log\_name}/

>

```json
{"openapi":"3.0.3","info":{"title":"muLearn API","version":"1.0.0"},"security":[{"jwtAuth":[]},{}],"components":{"securitySchemes":{"jwtAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"JWT Token Authentication. Enter **\"Bearer <token>\"**"}}},"paths":{"/api/v1/dashboard/error-log/view/{log_name}/":{"get":{"operationId":"dashboard_error_log_view_retrieve","parameters":[{"in":"path","name":"log_name","schema":{"type":"string"},"required":true}],"tags":["Error Log"],"responses":{"200":{"description":"No response body"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mulearn.org/api-reference/error-log.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
