{"openapi":"3.1.0","info":{"title":"Farsight support API","version":"1.0.0","description":"Report an issue through the Farsight API. For the full API reference, see https://farsight.observer/docs.md."},"servers":[{"url":"https://farsight.observer/v1"}],"paths":{"/support":{"post":{"operationId":"submitSupportReport","summary":"Send a support report","description":"Sends a report to the Farsight team. Remove API keys, SRT passphrases, and other secrets from logs before sending.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","message"],"properties":{"title":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\r\\n]+$","description":"A one-line issue title."},"message":{"type":"string","minLength":1,"maxLength":10000,"description":"What happened and how to reproduce it."},"logs":{"type":"string","maxLength":10000,"description":"Full diagnostic logs, with secrets removed."}}}}}},"responses":{"201":{"description":"The report was saved and sent to the Farsight team.","content":{"application/json":{"schema":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string","pattern":"^sr_[0-9a-f-]{36}$"},"status":{"type":"string","const":"sent"}}}}}},"401":{"description":"Missing or invalid API key."},"413":{"description":"The JSON body is too large."},"422":{"description":"The JSON body or a field is invalid."},"500":{"description":"The report could not be saved."}}},"get":{"operationId":"listSupportReports","summary":"List your support reports","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Your reports, newest activity first.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","title","message","logs","status","created_at","updated_at","resolved_at","comment_count"],"properties":{"id":{"type":"string","pattern":"^sr_[0-9a-f-]{36}$"},"title":{"type":"string"},"message":{"type":"string"},"logs":{"type":"string"},"status":{"type":"string","enum":["open","resolved"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"},"comment_count":{"type":"integer","minimum":0}}}}}}}}},"401":{"description":"Missing or invalid API key."}}}},"/support/{id}":{"get":{"operationId":"getSupportReport","summary":"Read one report and its comments","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sr_[0-9a-f-]{36}$"}}],"responses":{"200":{"description":"The report with every comment, oldest first.","content":{"application/json":{"schema":{"type":"object","required":["id","title","message","logs","status","created_at","updated_at","resolved_at","comment_count","comments"],"properties":{"id":{"type":"string","pattern":"^sr_[0-9a-f-]{36}$"},"title":{"type":"string"},"message":{"type":"string"},"logs":{"type":"string"},"status":{"type":"string","enum":["open","resolved"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"},"comment_count":{"type":"integer","minimum":0},"comments":{"type":"array","items":{"type":"object","required":["id","author","body","created_at"],"properties":{"id":{"type":"string","pattern":"^sc_[0-9a-f-]{36}$"},"author":{"type":"string","enum":["customer","team"],"description":"customer is the reporter; team is Farsight."},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"No report with this id on your account."}}}},"/support/{id}/comments":{"post":{"operationId":"addSupportComment","summary":"Reply on a report","description":"Adds a customer comment. A reply to a resolved report reopens it.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sr_[0-9a-f-]{36}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":10000}}}}}},"responses":{"201":{"description":"The comment was added.","content":{"application/json":{"schema":{"type":"object","required":["id","author","body","created_at"],"properties":{"id":{"type":"string","pattern":"^sc_[0-9a-f-]{36}$"},"author":{"type":"string","enum":["customer","team"],"description":"customer is the reporter; team is Farsight."},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"No report with this id on your account."},"422":{"description":"The body is missing or too long."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Farsight API key beginning with fs_."}}}}