# 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.3.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.3.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"]}}}}
```
