> For the complete documentation index, see [llms.txt](https://renewables.docs.helinplatform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://renewables.docs.helinplatform.com/api-reference/logs.md).

# Logs

## Log Of Device Errors Over Last Period (In Hours)

> List devices and errors seen over period (defaults to 12 hours).\
> \
> Each device will contain unique error messages seen\
> together with last seen timestamp and overall number of errors.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"DeviceErrorsSchema":{"properties":{"error_count":{"default":0,"title":"Error Count","type":"integer"},"errors":{"default":[],"items":{"type":"string"},"title":"Errors","type":"array"},"last_seen":{"default":"","title":"Last Seen","type":"string"},"site_id":{"format":"uuid","nullable":true,"title":"Site Id","type":"string"},"site_tag":{"nullable":true,"title":"Site Tag","type":"string"}},"title":"DeviceErrorsSchema","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/device-error-logs":{"get":{"description":"List devices and errors seen over period (defaults to 12 hours).\n\nEach device will contain unique error messages seen\ntogether with last seen timestamp and overall number of errors.","operationId":"Log_of_device_errors_over_last_period__in_hours__api_device_error_logs_get","parameters":[{"in":"query","name":"period","required":false,"schema":{"default":12,"title":"Period","type":"integer"}},{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/DeviceErrorsSchema"},"title":"Response Log Of Device Errors Over Last Period  In Hours  Api Device Error Logs Get","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Log Of Device Errors Over Last Period (In Hours)","tags":["logs","devices"]}}}}
```

## Logs Of Last Operations

> List last Operational Logs from all Sites.\
> \
> Returns:\
> &#x20;   Last Operational Log for each site.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"ReturnLogSchema":{"properties":{"category":{"title":"Category","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"result":{"$ref":"#/components/schemas/CurtailmentLogResultSchema","nullable":true,"title":"Result"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"status":{"$ref":"#/components/schemas/CurtailmentOperationStatus"},"value":{"nullable":true,"title":"Value","type":"string"},"watchdog":{"title":"Watchdog","type":"boolean"}},"required":["site_id","value","status","category","result","watchdog","id","created_at"],"title":"ReturnLogSchema","type":"object"},"CurtailmentLogResultSchema":{"properties":{"not_updated_devices":{"additionalProperties":{"$ref":"#/components/schemas/NotUpdatedDeviceLogSchema"},"title":"Not Updated Devices","type":"object"},"updated_devices":{"additionalProperties":{"$ref":"#/components/schemas/UpdatedDeviceLogSchema"},"title":"Updated Devices","type":"object"}},"required":["updated_devices","not_updated_devices"],"title":"CurtailmentLogResultSchema","type":"object"},"NotUpdatedDeviceLogSchema":{"properties":{"detail":{"title":"Detail","type":"string"},"reason":{"title":"Reason","type":"string"}},"required":["reason","detail"],"title":"NotUpdatedDeviceLogSchema","type":"object"},"UpdatedDeviceLogSchema":{"properties":{"value":{"title":"Value","type":"number"}},"required":["value"],"title":"UpdatedDeviceLogSchema","type":"object"},"CurtailmentOperationStatus":{"enum":["completed","exception"],"title":"CurtailmentOperationStatus","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/logs":{"get":{"description":"List last Operational Logs from all Sites.\n\nReturns:\n    Last Operational Log for each site.","operationId":"Logs_of_last_operations_api_logs_get","parameters":[{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReturnLogSchema"},"title":"Response Logs Of Last Operations Api Logs Get","type":"array"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Logs Of Last Operations","tags":["logs"]}}}}
```

## Log Of Operation Details.

> Get full details of an Operational Log.\
> \
> Returns:\
> &#x20;   Operational Log details.\
> &#x20;   HTTP 404 if operational log not found.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"ReturnLogSchema":{"properties":{"category":{"title":"Category","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"result":{"$ref":"#/components/schemas/CurtailmentLogResultSchema","nullable":true,"title":"Result"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"status":{"$ref":"#/components/schemas/CurtailmentOperationStatus"},"value":{"nullable":true,"title":"Value","type":"string"},"watchdog":{"title":"Watchdog","type":"boolean"}},"required":["site_id","value","status","category","result","watchdog","id","created_at"],"title":"ReturnLogSchema","type":"object"},"CurtailmentLogResultSchema":{"properties":{"not_updated_devices":{"additionalProperties":{"$ref":"#/components/schemas/NotUpdatedDeviceLogSchema"},"title":"Not Updated Devices","type":"object"},"updated_devices":{"additionalProperties":{"$ref":"#/components/schemas/UpdatedDeviceLogSchema"},"title":"Updated Devices","type":"object"}},"required":["updated_devices","not_updated_devices"],"title":"CurtailmentLogResultSchema","type":"object"},"NotUpdatedDeviceLogSchema":{"properties":{"detail":{"title":"Detail","type":"string"},"reason":{"title":"Reason","type":"string"}},"required":["reason","detail"],"title":"NotUpdatedDeviceLogSchema","type":"object"},"UpdatedDeviceLogSchema":{"properties":{"value":{"title":"Value","type":"number"}},"required":["value"],"title":"UpdatedDeviceLogSchema","type":"object"},"CurtailmentOperationStatus":{"enum":["completed","exception"],"title":"CurtailmentOperationStatus","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/logs/{log_id}":{"get":{"description":"Get full details of an Operational Log.\n\nReturns:\n    Operational Log details.\n    HTTP 404 if operational log not found.","operationId":"Log_of_operation_details__api_logs__log_id__get","parameters":[{"in":"path","name":"log_id","required":true,"schema":{"format":"uuid","title":"Log Id","type":"string"}},{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnLogSchema"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Log Of Operation Details.","tags":["logs"]}}}}
```

## Logs Of Operations Of A Site

> Get Operational Log from a site.\
> \
> Args:\
> &#x20;   limit: limit number of log returned.\
> \
> Returns:\
> &#x20;   Last 10 records of operational logs for a given site.\
> &#x20;   HTTP 404 if Site not found.

```json
{"openapi":"3.0.3","info":{"title":"POLARIS Curtailment API","version":"0.1"},"security":[{"Auth0HTTPBearer":[]}],"components":{"securitySchemes":{"Auth0HTTPBearer":{"scheme":"bearer","type":"http"}},"schemas":{"ReturnLogSchema":{"properties":{"category":{"title":"Category","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"result":{"$ref":"#/components/schemas/CurtailmentLogResultSchema","nullable":true,"title":"Result"},"site_id":{"format":"uuid","title":"Site Id","type":"string"},"status":{"$ref":"#/components/schemas/CurtailmentOperationStatus"},"value":{"nullable":true,"title":"Value","type":"string"},"watchdog":{"title":"Watchdog","type":"boolean"}},"required":["site_id","value","status","category","result","watchdog","id","created_at"],"title":"ReturnLogSchema","type":"object"},"CurtailmentLogResultSchema":{"properties":{"not_updated_devices":{"additionalProperties":{"$ref":"#/components/schemas/NotUpdatedDeviceLogSchema"},"title":"Not Updated Devices","type":"object"},"updated_devices":{"additionalProperties":{"$ref":"#/components/schemas/UpdatedDeviceLogSchema"},"title":"Updated Devices","type":"object"}},"required":["updated_devices","not_updated_devices"],"title":"CurtailmentLogResultSchema","type":"object"},"NotUpdatedDeviceLogSchema":{"properties":{"detail":{"title":"Detail","type":"string"},"reason":{"title":"Reason","type":"string"}},"required":["reason","detail"],"title":"NotUpdatedDeviceLogSchema","type":"object"},"UpdatedDeviceLogSchema":{"properties":{"value":{"title":"Value","type":"number"}},"required":["value"],"title":"UpdatedDeviceLogSchema","type":"object"},"CurtailmentOperationStatus":{"enum":["completed","exception"],"title":"CurtailmentOperationStatus","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/sites/{site_id}/logs":{"get":{"description":"Get Operational Log from a site.\n\nArgs:\n    limit: limit number of log returned.\n\nReturns:\n    Last 10 records of operational logs for a given site.\n    HTTP 404 if Site not found.","operationId":"Logs_of_operations_of_a_site_api_sites__site_id__logs_get","parameters":[{"in":"path","name":"site_id","required":true,"schema":{"format":"uuid","nullable":true,"title":"Site Id","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"title":"Limit","type":"integer"}},{"in":"header","name":"X-Management-Token","required":false,"schema":{"nullable":true,"title":"X-Management-Token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReturnLogSchema"},"title":"Response Logs Of Operations Of A Site Api Sites  Site Id  Logs Get","type":"array"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"type":"string"},"title":"Detail","type":"array"}},"title":"Object not found","type":"object"}}},"description":"Object not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Logs Of Operations Of A Site","tags":["logs"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://renewables.docs.helinplatform.com/api-reference/logs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
