{"openapi":"3.1.0","info":{"title":"Customer APIs","description":"Feedback, asset management, and other customer-facing APIs.","version":"0.1.0"},"paths":{"/v1/event-feedback/":{"post":{"tags":["feedback"],"summary":"Post Feedback","operationId":"post_feedback_v1_event_feedback__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFeedbackRequest","description":"Feedback submitted by the customer for a given event."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFeedbackAccepted"}}}},"400":{"description":"The request body is not valid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequest"}}}},"413":{"description":"The request body is larger than 256 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequest"}}}},"403":{"description":"The token lacks write:event:feedback, this customer is not configured for event feedback, or the caller cannot access the requested report or incident."},"404":{"description":"The requested report, incident, or event was not found."},"502":{"description":"The submission was valid but could not be recorded. Retry the request."},"422":{"description":"The body is not a JSON object, required information is missing, or one or more submitted values are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequest"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/assets/s3-upload":{"post":{"tags":["assets"],"summary":"Create S3 Upload Url","operationId":"create_s3_upload_url_v1_assets_s3_upload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetS3UploadResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/assets/csv-upload":{"post":{"tags":["assets"],"summary":"Post Feedback","operationId":"post_feedback_v1_assets_csv_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_post_feedback_v1_assets_csv_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCSVUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/assets/status/{job_id}":{"get":{"tags":["assets"],"summary":"Get Job Status","operationId":"get_job_status_v1_assets_status__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AssetCSVUploadResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The UUID of the newly created processing job."}},"type":"object","required":["job_id"],"title":"AssetCSVUploadResponse"},"AssetS3UploadResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The UUID of the newly created processing job."},"s3_url":{"type":"string","title":"S3 Url","description":"A signed S3 URL to which the asset state snapshot CSV will be uploaded."}},"type":"object","required":["job_id","s3_url"],"title":"AssetS3UploadResponse"},"Body_post_feedback_v1_assets_csv_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_post_feedback_v1_assets_csv_upload_post"},"Disposition":{"type":"string","enum":["confirmed","corrected","rejected","missed","inconclusive"],"title":"Disposition"},"EventFeedbackAccepted":{"properties":{"message":{"type":"string","const":"accepted","title":"Message","description":"The submission was accepted."},"submission_id":{"type":"string","format":"uuid","title":"Submission Id","description":"The id minted for this submission."}},"type":"object","required":["message","submission_id"],"title":"EventFeedbackAccepted"},"EventFeedbackRequest":{"properties":{"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id","description":"The UUID of the event."},"incident_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Incident Id","description":"The UUID of the incident."},"disposition":{"$ref":"#/components/schemas/Disposition","description":"How the customer classified the event."},"report_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Report Id","description":"The UUID of the report."},"comment":{"type":"string","title":"Comment","default":""},"customer_event_properties":{"additionalProperties":true,"type":"object","title":"Customer Event Properties","description":"Customer-specific event fields. Allowed keys depend on the customer. Unknown keys are rejected.","example":{}},"customer_event_impact":{"additionalProperties":true,"type":"object","title":"Customer Event Impact","description":"Customer-specific impact and response fields. Unknown keys are rejected. Required keys apply when this object is sent.","example":{}}},"additionalProperties":false,"type":"object","required":["disposition"],"title":"EventFeedbackRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvalidField":{"properties":{"field":{"type":"string","title":"Field","description":"Dotted path of the invalid field, such as disposition."},"value":{"title":"Value","description":"The submitted value. Omitted for an unrecognized field."},"allowed":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed","description":"Allowed values. Present when the submitted value is outside an allowed set."},"message":{"type":"string","title":"Message","description":"What is wrong with this field."}},"type":"object","required":["field","message"],"title":"InvalidField","description":"One invalid field. `value` and `allowed` are omitted when they do not apply."},"InvalidRequest":{"properties":{"error":{"type":"string","const":"invalid_request","title":"Error","default":"invalid_request"},"message":{"type":"string","title":"Message"},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/InvalidField"},"type":"array"},{"type":"null"}],"title":"Errors","description":"One entry per submitted value that is invalid. Omitted when required information is missing."}},"type":"object","required":["message"],"title":"InvalidRequest","description":"Body for a request that failed validation."},"JobStatus":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The UUID of the newly created processing job."},"status":{"type":"string","title":"Status","description":"UPLOADING: Pending user upload. UPLOADED: File is received but not yet processed. PROCESSING: A worker is processing applying changes to resources. COMPLETED: The job is done processing and results are available. FAILED: The job was unable to complete or to otherwise process the file. "},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Issues encountered during processing."},"result_path":{"type":"string","title":"Result Path","description":"If complete or failed, the S3 URL to the result file."}},"type":"object","required":["job_id","status","result_path"],"title":"JobStatus"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}