{"openapi":"3.1.0","info":{"title":"Papertrail (BYOK) API","version":"0.1.0","description":"Papertrail (BYOK) lets an AI assistant read your own Papertrail data through the Papertrail API with a key you supply (Papertrail API token). Read-only: 6 tools (search_events, list_systems, get_system, list_groups, list_saved_searches, list_destinations). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-papertrail.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-papertrail/docs"},"termsOfService":"https://connectorbay.com/byok-papertrail/terms"},"servers":[{"url":"https://byok-papertrail.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-papertrail/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/search_events":{"post":{"operationId":"search_events","summary":"Search Papertrail log events, newest first. Supports the web search syntax (words, quotes, OR, AND, -exclude), a system ","description":"Search Papertrail log events, newest first. Supports the web search syntax (words, quotes, OR, AND, -exclude), a system or group, and a time window in epoch seconds. Each event has time, sender, program, severity and message. Use for \"Show recent error messages in Papertrail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Papertrail search query, for example 'error' or 'ssh OR (\"authentication failure\" AND success)'. Empty returns all events.","title":"Q"},"system_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only events from this system (numeric id, or its name with letters, digits and underscores).","title":"System Id"},"group_id":{"anyOf":[{"maximum":1000000000000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only events from this group (numeric id).","title":"Group Id"},"min_time":{"anyOf":[{"maximum":4102444800,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Oldest time to examine, epoch seconds UTC.","title":"Min Time"},"max_time":{"anyOf":[{"maximum":4102444800,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Newest time to examine, epoch seconds UTC.","title":"Max Time"},"max_id":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Only events older than this event id; pass the previous answer's min_id to page backward.","title":"Max Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum events to return (1 to 100 here; the provider allows up to 10000).","title":"Limit"}},"title":"search_eventsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_systems":{"post":{"operationId":"list_systems","summary":"List the systems (log senders) with name, IP address, hostname, last event time and the syslog host and port they send t","description":"List the systems (log senders) with name, IP address, hostname, last event time and the syslog host and port they send to. Use for \"Which systems send logs to Papertrail and which stopped\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_systemsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_system":{"post":{"operationId":"get_system","summary":"Get one system by numeric id: name, IP address, hostname, last event time and syslog destination. Use for \"Show Papertra","description":"Get one system by numeric id: name, IP address, hostname, last event time and syslog destination. Use for \"Show Papertrail system 3248\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"system_id":{"description":"Numeric system id from list_systems.","maximum":1000000000000,"minimum":1,"title":"System Id","type":"integer"}},"required":["system_id"],"title":"get_systemArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_groups":{"post":{"operationId":"list_groups","summary":"List the groups with id, name and system wildcard. The systems inside each group are not listed here; use list_systems. ","description":"List the groups with id, name and system wildcard. The systems inside each group are not listed here; use list_systems. Use for \"Which log groups exist in Papertrail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_groupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_saved_searches":{"post":{"operationId":"list_saved_searches","summary":"List saved searches with name, query and the group each searches. Use for \"What saved searches do I have in Papertrail\".","description":"List saved searches with name, query and the group each searches. Use for \"What saved searches do I have in Papertrail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_saved_searchesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_destinations":{"post":{"operationId":"list_destinations","summary":"List the log destinations (syslog host, port, description and filter) that senders can use. Use for \"Where can I send lo","description":"List the log destinations (syslog host, port, description and filter) that senders can use. Use for \"Where can I send logs to in Papertrail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_destinationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}