{"openapi":"3.0.0","servers":[],"info":{"description":"Aalto Helpdesk API","version":"1.0.0","title":"Aalto Helpdesk API","contact":{"email":"razvan.dumitru@sigtree.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"suppliers","description":"Api calls available to suppliers"}],"paths":{"/users/app/automation/api/v1/{instance_id}/ticket/update":{"post":{"tags":["suppliers"],"summary":"Updates the status of a ticket","operationId":"updateTicket","description":"As a supplier you can update the status of a ticket according to allowed state transitions","parameters":[{"in":"path","name":"instance_id","description":"supplier API instance id (provided by sigtree)","required":true,"schema":{"type":"string","format":"uuid","example":"d09b6b75-bf0f-11eb-890a-0242ac120002"}},{"in":"header","name":"Authorization","description":"supplier API key (provided by sigtree)","required":true,"schema":{"type":"string","example":"Bearer 73680b7e897d01588791ab05e6fcc7bc"}}],"responses":{"200":{"description":"ticket updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OKResponse"}}}},"400":{"description":"bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAILResponse"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAILResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAILResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"TicketStatus","required":["id","status","username"],"properties":{"id":{"type":"integer","example":1,"description":"id of the ticket to update"},"status":{"type":"string","enum":["Read","In Progress","Resolved","Closed","Pending","Rejected"],"example":"Read","description":"new ticket status"},"username":{"type":"string","description":"user to perform the update as, must belong to supplier, must have access to ticket","example":"john.doe"},"content":{"type":"string","description":"short message for the update","example":"Starting work ASAP"}}}}},"description":"Ticket update data"}}},"/users/app/automation/api/v1/{instance_id}/note":{"post":{"tags":["suppliers"],"summary":"Adds a new note to a ticket","operationId":"addNote","description":"Add a new note to an existing ticket","parameters":[{"in":"path","name":"instance_id","description":"supplier API instance id (provided by sigtree)","required":true,"schema":{"type":"string","format":"uuid","example":"d09b6b75-bf0f-11eb-890a-0242ac120002"}},{"in":"header","name":"Authorization","description":"supplier API key (provided by sigtree)","required":true,"schema":{"type":"string","example":"Bearer 73680b7e897d01588791ab05e6fcc7bc"}}],"responses":{"200":{"description":"note added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OKResponse"}}}},"400":{"description":"bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAILResponse"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAILResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAILResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Note","required":["id","status","username"],"properties":{"id":{"type":"integer","example":1,"description":"id of the ticket to add the note to"},"username":{"type":"string","description":"user to add the note as, must belong to supplier, must have access to ticket","example":"john.doe"},"content":{"type":"string","description":"Note content","example":"Starting work ASAP"},"attachments":{"type":"array","items":{"type":"object","required":["content"],"properties":{"name":{"type":"string","description":"Optional file name, without extension, autogenerated if missing","example":"my_file"},"content":{"type":"string","format":"base64","example":"data:image/jpeg;base64,..."}}}}}}}},"description":"Note to add"}}}},"components":{"schemas":{"OKResponse":{"type":"object","required":["status","message"],"properties":{"status":{"type":"string","enum":["ok"],"example":"ok"},"message":{"type":"string","description":"Human readable message describing result of operation","example":"Success message"}}},"FAILResponse":{"type":"object","required":["status","message","error"],"properties":{"status":{"type":"string","enum":["fail"],"example":"fail"},"message":{"type":"string","description":"Human readable message describing result of operation","example":"Failure message"},"error":{"type":"string","example":"unauthorized"}}}}}}