# Logs

## Get logs by operation ID

> Fetches all log entries for a given operation ID. Supports optional filtering by time range using from/to query parameters. Logs are returned in chronological order. Used for debugging and monitoring task execution.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/logs/{operationId}":{"get":{"operationId":"LogsController_getLogs","summary":"Get logs by operation ID","description":"Fetches all log entries for a given operation ID. Supports optional filtering by time range using from/to query parameters. Logs are returned in chronological order. Used for debugging and monitoring task execution.","parameters":[{"name":"operationId","required":true,"in":"path","description":"Operation ID to fetch logs for","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Start timestamp (ISO format)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End timestamp (ISO format)","schema":{"type":"string"}}],"responses":{"200":{"description":"Logs retrieved successfully"},"403":{"description":"Forbidden - Requires role: member, application"},"404":{"description":"No logs found for operation"}},"tags":["Logs"]}}}}
```

## Delete logs by operation ID

> Permanently removes all log entries associated with the specified operation ID. This action cannot be undone. Useful for cleaning up old logs or removing sensitive information. Only owners and application tokens can perform this operation.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/logs/{operationId}":{"delete":{"operationId":"LogsController_deleteLogs","summary":"Delete logs by operation ID","description":"Permanently removes all log entries associated with the specified operation ID. This action cannot be undone. Useful for cleaning up old logs or removing sensitive information. Only owners and application tokens can perform this operation.","parameters":[{"name":"operationId","required":true,"in":"path","description":"Operation ID to delete logs for","schema":{"type":"string"}}],"responses":{"200":{"description":"Logs deleted successfully"},"403":{"description":"Forbidden - Requires role: owner, application"},"404":{"description":"No logs found for operation"}},"tags":["Logs"]}}}}
```


---

# 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.flxbl.io/flxbl/sfp-server/api-reference/logs.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.
