{"openapi":"3.1.0","info":{"title":"EM (NPA) Redactions","description":"API to facilitate Document Redaction","version":"v1.0.1"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"tags":[{"name":"Markups Service","description":"Endpoint for managing Markups."},{"name":"Redactions Service","description":"Endpoint for managing Redactions."}],"paths":{"/api/markups":{"put":{"tags":["Markups Service"],"summary":"Update an existing RedactionDTO","description":"A PUT request to update an RedactionDTO","operationId":"updateMarkUp","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}},"required":true},"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}},"500":{"description":"RedactionDTO couldn't be updated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}},"401":{"description":"Unauthorised","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}}}},"post":{"tags":["Markups Service"],"summary":"Create an RedactionDTO","description":"A POST request to create an RedactionDTO","operationId":"createMarkUp","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}},"required":true},"responses":{"201":{"description":"Successfully created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}},"401":{"description":"Unauthorised","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionDTO"}}}}}}},"/api/redaction":{"post":{"tags":["Redactions Service"],"summary":"Burn markups onto Document","description":"A POST request to burn markups onto Document and return the newly redacted document","operationId":"save","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionRequest"}}},"required":true},"responses":{"200":{"description":"Successfully redacted","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorised","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Server Error","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/markups/search":{"post":{"tags":["Markups Service"],"summary":"Create an RedactionSetDTO","description":"A POST request to create an RedactionSetDTO","operationId":"createSearchMarkUps","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionSetDTO"}}},"required":true},"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionSetDTO"}}}},"401":{"description":"Unauthorised","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionSetDTO"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedactionSetDTO"}}}}}}},"/api/markups/{documentId}":{"get":{"tags":["Markups Service"],"summary":"Get all markups for Document ID","operationId":"getAllDocumentMarkUps","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","description":"Document Id","required":true,"schema":{"type":"UUID"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RedactionDTO"}}}}},"204":{"description":"No Content","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RedactionDTO"}}}}},"401":{"description":"Unauthorised","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RedactionDTO"}}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RedactionDTO"}}}}}}},"delete":{"tags":["Markups Service"],"summary":"Delete all RedactionDTOs","description":"A DELETE request to delete all the markups of the document","operationId":"deleteMarkUps","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","description":"Document Id","required":true,"schema":{"type":"UUID"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorised"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/":{"get":{"tags":["welcome-resource"],"operationId":"welcome","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/markups/{documentId}/{redactionId}":{"delete":{"tags":["Markups Service"],"summary":"Delete a RedactionDTO","description":"A DELETE request to delete the markup of the document","operationId":"deleteMarkUp","parameters":[{"name":"authorization","in":"header","description":"Authorization (Idam Bearer token)","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","description":"Service Authorization (S2S Bearer token)","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","description":"Document Id","required":true,"schema":{"type":"UUID"}},{"name":"redactionId","in":"path","description":"Redaction Id","required":true,"schema":{"type":"UUID"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorised"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/api/markups/document/{documentId}":{"delete":{"tags":["Markups Service"],"summary":"Delete all redactions for a document","description":"Deletes all redactions associated with the provided DocumentId","operationId":"deleteByDocumentId","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"serviceauthorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request"},"401":{"description":"Unauthorised"},"403":{"description":"Forbidden"},"500":{"description":"Server Error"}}}}},"components":{"schemas":{"RectangleDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"},"width":{"type":"number","format":"double"},"height":{"type":"number","format":"double"}},"required":["height","id","width","x","y"]},"RedactionDTO":{"type":"object","properties":{"redactionId":{"type":"string","format":"uuid"},"documentId":{"type":"string","format":"uuid"},"page":{"type":"integer","format":"int32"},"rectangles":{"type":"array","items":{"$ref":"#/components/schemas/RectangleDTO"},"uniqueItems":true}},"required":["documentId","page","redactionId"]},"RedactionRequest":{"type":"object","properties":{"caseId":{"type":"string"},"documentId":{"type":"string","format":"uuid"},"redactions":{"type":"array","items":{"$ref":"#/components/schemas/RedactionDTO"}}}},"RedactionSetDTO":{"type":"object","properties":{"searchRedactions":{"type":"array","items":{"$ref":"#/components/schemas/RedactionDTO"},"uniqueItems":true}},"required":["searchRedactions"]},"Pageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32","minimum":0},"size":{"type":"integer","format":"int32","minimum":1},"sort":{"type":"array","items":{"type":"string"}}}}}}}
