{"openapi":"3.1.0","info":{"title":"DilliC: service desk","description":"Planning and change management for organisations.\n\nEverything the web app and the phone app do, they do through this API. Sign in with an access token in the `Authorization` header. Send an `Idempotency-Key` header with a POST or a PATCH to make it safe to repeat.\n\nA response marked `x-dillic-recorded` was read off the answers the test suite received, not declared in the code: a field the suite never saw is missing from it. `/openapi/index.json` lists this description in parts small enough to read one at a time.","version":"1.0.0"},"paths":{"/api/v1/entities/{entity_id}/queues":{"get":{"tags":["service desk"],"summary":"List Queues","description":"List an entity's service desk queues, each with its response and\nresolution targets, working hours, categories, assignment method, the\nnumber of open requests, whether the desk is open now, and the portal\naddress and email address a requester would use. `may_answer` and\n`may_configure` say what the caller may do here.","operationId":"list_queues_api_v1_entities__entity_id__queues_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"may_answer":{"type":"boolean"},"may_configure":{"type":"boolean"},"queues":{"items":{"properties":{"address":{"type":"string"},"assignment":{"type":"string"},"categories":{"items":{"type":"string"},"type":"array"},"description":{"type":"string"},"email":{"type":["null","string"]},"hours":{"properties":{"days":{"items":{"type":"integer"},"type":"array"},"end":{"type":"string"},"start":{"type":"string"},"tz":{"type":"string"}},"required":["days","end","start","tz"],"type":["null","object"]},"id":{"type":"integer"},"name":{"type":"string"},"open_count":{"type":"integer"},"open_now":{"type":"boolean"},"portal_url":{"type":"string"},"public":{"type":"boolean"},"resolution_minutes":{"type":"integer"},"response_minutes":{"type":"integer"},"sla_by_priority":{"type":"null"}},"required":["address","assignment","categories","description","email","hours","id","name","open_count","open_now","portal_url","public","resolution_minutes","response_minutes","sla_by_priority"],"type":"object"},"type":"array"}},"required":["may_answer","may_configure","queues"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["service desk"],"summary":"Create Queue","description":"Open a service desk queue on an entity. A queue needs a name; its\nresponse and resolution targets, email address, categories, assignment\nmethod (`manual`, `round_robin` or `least_loaded`) and working hours are\noptional. Answers with the queue's id, name, key and the address of its\nportal.\n\nThe caller needs the `sprint.manage` right on the entity.","operationId":"create_queue_api_v1_entities__entity_id__queues_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"portal_url":{"type":"string"}},"required":["id","key","name","portal_url"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/desk-beneath":{"get":{"tags":["service desk"],"summary":"Desk Beneath","description":"The desks one level down, with what is on them now.\n\nFor each child the reader may see that has a queue somewhere beneath it:\nwhat is open and late across the child's whole subtree, and the child's\nown queues with their counts. A child with no desk anywhere beneath it is\nleft out rather than shown as quiet.\nA parent of teams therefore sees the teams' queues; a parent of parents\nsees the parents with their totals. Read as counts rather than as\nrequests, because a parent's desk is for seeing where the load is, and\nthe requests themselves are the child's desk's business - which is\nwhere a press on a row goes.","operationId":"desk_beneath_api_v1_entities__entity_id__desk_beneath_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"children":{"items":{"properties":{"entity_id":{"type":"integer"},"late_count":{"type":"integer"},"name":{"type":"string"},"open_count":{"type":"integer"},"queues":{"items":{"properties":{"id":{"type":"integer"},"late_count":{"type":"integer"},"name":{"type":"string"},"open_count":{"type":"integer"}},"required":["id","late_count","name","open_count"],"type":"object"},"type":"array"}},"required":["entity_id","late_count","name","open_count","queues"],"type":"object"},"type":"array"},"late_count":{"type":"integer"},"open_count":{"type":"integer"}},"required":["children","late_count","open_count"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/queues/{queue_id}":{"put":{"tags":["service desk"],"summary":"Update Queue","description":"Edit a queue. A full replace, and `QueueUpdate` makes it one.","operationId":"update_queue_api_v1_queues__queue_id__put","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"integer","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["service desk"],"summary":"Delete Queue","description":"Take a queue away: its portal address stops answering.\n\nOnly an empty one. A queue with requests on it, open or closed, is the\nrecord of what people asked and were told, and those rows name it; the\nway to stop more arriving is to make it private. The queue this\ndeployment's own feedback is forwarded to stays whatever is on it.","operationId":"delete_queue_api_v1_queues__queue_id__delete","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"integer","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"deleted":{"type":"boolean"},"id":{"type":"integer"}},"required":["deleted","id"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/requests":{"get":{"tags":["service desk"],"summary":"List Requests","description":"List an entity's requests, newest first, each with its status,\npriority, queue, requester, assignee, linked work item and the state of\nits response and resolution clocks. Only open requests are listed unless\n`open_only` is false; `queue_id` and `kind` narrow the list further.\n\nThe caller needs the right to answer requests on the entity.","operationId":"list_requests_api_v1_entities__entity_id__requests_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}},{"name":"queue_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Id"}},{"name":"open_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Open Only"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RequestKind"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"requests":{"items":{"properties":{"assignee_id":{"type":["null","integer"]},"assignee_name":{"type":"string"},"category":{"type":"string"},"caused_by_change_id":{"type":["null","integer"]},"chat_channel":{"type":"string"},"clocks":{"properties":{"resolution":{"properties":{"breached":{"type":"boolean"},"due_at":{"type":"string"},"kept":{"type":"null"},"met_at":{"type":"null"},"minutes_left":{"type":"integer"}},"required":["breached","due_at","kept","met_at","minutes_left"],"type":"object"},"response":{"properties":{"breached":{"type":"boolean"},"due_at":{"type":"string"},"kept":{"type":["null","boolean"]},"met_at":{"type":["null","string"]},"minutes_left":{"type":["null","integer"]}},"required":["breached","due_at","kept","met_at","minutes_left"],"type":"object"}},"required":["resolution","response"],"type":"object"},"created_at":{"type":"string"},"detected_at":{"type":["null","string"]},"fix_change_id":{"type":"null"},"id":{"type":"integer"},"kind":{"type":"string"},"known_error":{"type":"string"},"language":{"type":"string"},"last_from":{"type":["null","string"]},"paused_minutes":{"type":"integer"},"priority":{"type":"string"},"problem_id":{"type":"null"},"queue_id":{"type":"integer"},"queue_name":{"type":"string"},"rating":{"type":"null"},"rating_comment":{"type":"string"},"reference":{"type":"string"},"requester_email":{"type":"string"},"requester_name":{"type":"string"},"root_cause":{"type":"string"},"services":{"items":{"properties":{"archived_at":{"type":"null"},"criticality":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"},"stage":{"type":"string"},"weight_pct":{"type":"null"}},"required":["archived_at","criticality","id","kind","name","stage"],"type":"object"},"type":"array"},"severity":{"type":["null","string"]},"started_at":{"type":"null"},"status":{"type":"string"},"subject":{"type":"string"},"summary":{"type":"string"},"updated_at":{"type":"string"},"via_chat":{"type":"boolean"},"work_item_id":{"type":"null"},"work_item_reference":{"type":"string"},"work_item_title":{"type":"string"}},"required":["assignee_id","assignee_name","category","caused_by_change_id","clocks","created_at","detected_at","fix_change_id","id","kind","known_error","language","last_from","paused_minutes","priority","problem_id","queue_id","queue_name","rating","rating_comment","reference","requester_email","requester_name","root_cause","services","severity","started_at","status","subject","summary","updated_at","work_item_id","work_item_reference","work_item_title"],"type":"object"},"type":"array"}},"required":["requests"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["service desk"],"summary":"Raise From Inside","description":"Raise a request, an incident or a problem from inside the organisation\n(plan phase 2). The desk only took things from outside before; an\nincident is reported by the people watching the service, and a problem\nis opened by the desk itself.","operationId":"raise_from_inside_api_v1_entities__entity_id__requests_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaiseInsideIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"kind":{"type":"string"},"reference":{"type":"string"}},"required":["id","kind","reference"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}":{"get":{"tags":["service desk"],"summary":"Read Request","description":"One request and everything said about it, internal notes included.","operationId":"read_request_api_v1_requests__request_id__get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"size_bytes":{"type":"integer"}},"required":["content_type","filename","id","size_bytes"],"type":"object"},"type":"array"},"messages":{"items":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"by_chat":{"type":"boolean"},"by_email":{"type":"boolean"},"created_at":{"type":"string"},"from_agent":{"type":"boolean"},"id":{"type":"integer"},"internal":{"type":"boolean"}},"required":["author","body","by_email","created_at","from_agent","id","internal"],"type":"object"},"type":"array"},"request":{"properties":{"assignee_id":{"type":["null","integer"]},"assignee_name":{"type":"string"},"category":{"type":"string"},"caused_by_change":{"properties":{"actual_start":{"type":"null"},"change_type":{"type":"string"},"id":{"type":"integer"},"outcome":{"type":"null"},"planned_start":{"type":"string"},"reference":{"type":"string"},"risk":{"type":"string"},"state_name":{"type":"string"},"title":{"type":"string"}},"required":["actual_start","change_type","id","outcome","planned_start","reference","risk","state_name","title"],"type":["null","object"]},"caused_by_change_id":{"type":["null","integer"]},"chat_channel":{"type":"string"},"clocks":{"properties":{"resolution":{"properties":{"breached":{"type":"boolean"},"due_at":{"type":["null","string"]},"kept":{"type":["null","boolean"]},"met_at":{"type":["null","string"]},"minutes_left":{"type":["null","integer"]}},"required":["breached","due_at","kept","met_at","minutes_left"],"type":"object"},"response":{"properties":{"breached":{"type":"boolean"},"due_at":{"type":["null","string"]},"kept":{"type":["null","boolean"]},"met_at":{"type":["null","string"]},"minutes_left":{"type":["null","integer"]}},"required":["breached","due_at","kept","met_at","minutes_left"],"type":"object"}},"required":["resolution","response"],"type":"object"},"created_at":{"type":"string"},"detected_at":{"type":["null","string"]},"fix_change":{"properties":{"actual_start":{"type":"null"},"change_type":{"type":"string"},"id":{"type":"integer"},"outcome":{"type":"null"},"planned_start":{"type":"string"},"reference":{"type":"string"},"risk":{"type":"string"},"state_name":{"type":"string"},"title":{"type":"string"}},"required":["actual_start","change_type","id","outcome","planned_start","reference","risk","state_name","title"],"type":"object"},"fix_change_id":{"type":["null","integer"]},"id":{"type":"integer"},"incidents":{"items":{"properties":{"created_at":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"priority":{"type":"string"},"reference":{"type":"string"},"resolved_at":{"type":"null"},"severity":{"type":"string"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["created_at","id","kind","priority","reference","resolved_at","severity","status","subject"],"type":"object"},"type":"array"},"kind":{"type":"string"},"known_error":{"type":"string"},"language":{"type":"string"},"last_from":{"type":["null","string"]},"page":{"properties":{"acknowledged_at":{"type":"null"},"acknowledged_by_name":{"type":"string"},"ended_at":{"type":"null"},"id":{"type":"integer"},"next_at":{"type":"string"},"policy_id":{"type":"integer"},"policy_name":{"type":"string"},"request_id":{"type":"integer"},"round":{"type":"integer"},"rounds":{"type":"integer"},"started_at":{"type":"string"},"started_by_name":{"type":"string"},"state":{"type":"string"},"step":{"type":"integer"},"steps":{"type":"integer"},"told":{"items":{"properties":{"at":{"type":"string"},"covering_for_name":{"type":"string"},"name":{"type":"string"},"person_id":{"type":"integer"},"rota_name":{"type":"string"},"round":{"type":"integer"},"step":{"type":"integer"}},"required":["at","covering_for_name","name","person_id","rota_name","round","step"],"type":"object"},"type":"array"}},"required":["acknowledged_at","acknowledged_by_name","ended_at","id","next_at","policy_id","policy_name","request_id","round","rounds","started_at","started_by_name","state","step","steps","told"],"type":["null","object"]},"page_policy":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]},"paused_minutes":{"type":"integer"},"priority":{"type":"string"},"problem":{"type":"null"},"problem_id":{"type":"null"},"queue_id":{"type":"integer"},"queue_name":{"type":"string"},"rating":{"type":["null","integer"]},"rating_comment":{"type":"string"},"reference":{"type":"string"},"requester_email":{"type":"string"},"requester_name":{"type":"string"},"root_cause":{"type":"string"},"services":{"items":{"properties":{"archived_at":{"type":"null"},"criticality":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"},"stage":{"type":"string"},"weight_pct":{"type":"null"}},"required":["archived_at","criticality","id","kind","name","stage"],"type":"object"},"type":"array"},"severity":{"type":["null","string"]},"started_at":{"type":"null"},"status":{"type":"string"},"subject":{"type":"string"},"suggestions":{"properties":{"dismissed":{"type":"boolean"},"language":{"type":"string"},"priority":{"type":"string"},"queue_id":{"type":"null"},"queue_name":{"type":"string"},"summary":{"type":"string"},"triaged_at":{"type":"string"}},"required":["dismissed","language","priority","queue_id","queue_name","summary","triaged_at"],"type":["null","object"]},"summary":{"type":"string"},"updated_at":{"type":"string"},"via_chat":{"type":"boolean"},"work_item_id":{"type":["null","integer"]},"work_item_reference":{"type":"string"},"work_item_title":{"type":"string"}},"required":["assignee_id","assignee_name","category","caused_by_change_id","clocks","created_at","detected_at","fix_change_id","id","kind","known_error","language","last_from","paused_minutes","priority","problem_id","queue_id","queue_name","rating","rating_comment","reference","requester_email","requester_name","root_cause","services","severity","started_at","status","subject","suggestions","summary","updated_at","work_item_id","work_item_reference","work_item_title"],"type":"object"}},"required":["attachments","messages","request"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["service desk"],"summary":"Update Request","description":"Move it, hand it on, or tie it to the work that resolves it.","operationId":"update_request_api_v1_requests__request_id__put","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"status":{"type":"string"}},"required":["id","status"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/request-attachments/{attachment_id}":{"get":{"tags":["service desk"],"summary":"Download Request Attachment","description":"For whoever may answer the request it came with.","operationId":"download_request_attachment_api_v1_request_attachments__attachment_id__get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"integer","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/octet-stream":{}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/reply":{"post":{"tags":["service desk"],"summary":"Reply","description":"Answer, or make a note. A public reply is what stops the first clock.","operationId":"reply_api_v1_requests__request_id__reply_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"internal":{"type":"boolean"},"status":{"type":"string"}},"required":["id","internal","status"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/destinations":{"get":{"tags":["service desk"],"summary":"Destinations","description":"The queues this request could be moved to: every queue in the account\nthe caller may answer on, bar the one it is in. Named with their part of\nthe organisation, because two teams may both have a queue called\nSupport.","operationId":"destinations_api_v1_requests__request_id__destinations_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"destinations":{"items":{"properties":{"entity_name":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["entity_name","id","name"],"type":"object"},"type":"array"}},"required":["destinations"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/cause-candidates":{"get":{"tags":["service desk"],"summary":"Cause Candidates","description":"The changes that could have caused this incident: implemented against\none of its services in the three days before it started.","operationId":"cause_candidates_api_v1_requests__request_id__cause_candidates_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"changes":{"items":{"properties":{"actual_start":{"type":"string"},"change_type":{"type":"string"},"id":{"type":"integer"},"outcome":{"type":"null"},"planned_start":{"type":"string"},"reference":{"type":"string"},"risk":{"type":"string"},"state_name":{"type":"string"},"title":{"type":"string"}},"required":["actual_start","change_type","id","outcome","planned_start","reference","risk","state_name","title"],"type":"object"},"type":"array"}},"required":["changes"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/problems":{"get":{"tags":["service desk"],"summary":"List Problems","description":"The open problems here, for an incident to be grouped under.","operationId":"list_problems_api_v1_entities__entity_id__problems_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"problems":{"items":{"properties":{"created_at":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"priority":{"type":"string"},"reference":{"type":"string"},"resolved_at":{"type":"null"},"severity":{"type":"null"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["created_at","id","kind","priority","reference","resolved_at","severity","status","subject"],"type":"object"},"type":"array"}},"required":["problems"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/bulk":{"post":{"tags":["service desk"],"summary":"Update Requests","description":"The same change to several requests at once: hand five to somebody,\nclose a morning's worth, move a batch that landed on the wrong desk.\n\nWhat the patch names - the person, the work, the queue - is checked once\nbefore anything is touched, so a refusal is a refusal of the whole batch\nand never of its second half. What can still differ per request is\nwhether the caller may answer on it, and a request they may not is\nskipped and named rather than failing the rest.","operationId":"update_requests_api_v1_requests_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"changed":{"items":{"type":"integer"},"type":"array"},"skipped":{"items":{"properties":{"id":{"type":"integer"},"reason":{"type":"string"}},"required":["id","reason"],"type":"object"},"type":"array"}},"required":["changed","skipped"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"session":[]},{"token":[]}]}},"/api/v1/requests/{request_id}/work-item":{"post":{"tags":["service desk"],"summary":"Work Item From Request","description":"The answer turned out to be work: raise it, on the request's own part\nof the organisation, and tie the two together.\n\nThe item is made the way the board makes one - same checks, same first\ncolumn, same page for a top rung - so it is an ordinary item that\nhappens to remember where it came from. The request keeps the thread;\nthe item gets the subject, who asked, and what they said first, so\nwhoever picks it up can read it without opening the desk.","operationId":"work_item_from_request_api_v1_requests__request_id__work_item_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemFromRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"reference":{"type":"string"}},"required":["id","reference"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/canned-replies":{"get":{"tags":["service desk"],"summary":"List Canned","description":"What the composer offers at this desk: its own and the ones from\nabove, nearest first.","operationId":"list_canned_api_v1_entities__entity_id__canned_replies_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"holes":{"items":{"type":"string"},"type":"array"},"may_configure":{"type":"boolean"},"replies":{"items":{"properties":{"body":{"type":"string"},"entity_id":{"type":"integer"},"entity_name":{"type":"string"},"id":{"type":"integer"},"own":{"type":"boolean"},"title":{"type":"string"}},"required":["body","entity_id","entity_name","id","own","title"],"type":"object"},"type":"array"}},"required":["holes","may_configure","replies"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["service desk"],"summary":"Create Canned","description":"Write a canned reply for an entity's desk, from a title and a body.\nThe body may carry the placeholders `{name}`, `{reference}`, `{queue}`\nand `{agent}`, which are filled in when the reply is used; any other\nplaceholder is refused. Answers with the reply's id and title.\n\nThe caller needs the `sprint.manage` right on the entity.","operationId":"create_canned_api_v1_entities__entity_id__canned_replies_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"required":["id","title"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/canned-replies/{reply_id}":{"put":{"tags":["service desk"],"summary":"Update Canned","description":"Replace a canned reply's title and body, under the same rules as\nwriting one, and answer with its id and title. The caller needs the\n`sprint.manage` right on the entity the reply belongs to.","operationId":"update_canned_api_v1_canned_replies__reply_id__put","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"reply_id","in":"path","required":true,"schema":{"type":"integer","title":"Reply Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"required":["id","title"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["service desk"],"summary":"Delete Canned","description":"Delete a canned reply, so that the desk and the desks beneath it no\nlonger offer it. The caller needs the `sprint.manage` right on the\nentity the reply belongs to.","operationId":"delete_canned_api_v1_canned_replies__reply_id__delete","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"reply_id","in":"path","required":true,"schema":{"type":"integer","title":"Reply Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"deleted":{"type":"boolean"},"id":{"type":"integer"}},"required":["deleted","id"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/answers":{"get":{"tags":["service desk"],"summary":"Likely Answers","description":"The pages most like this request, from the desk's entity and the ones\nabove it, as far as the reader may read: what the organisation already\nknows, put in front of the question. Matched on the subject and what the\nrequester last said - see services/knowledge.","operationId":"likely_answers_api_v1_requests__request_id__answers_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"answers":{"items":{"properties":{"audience":{"type":"string"},"cited":{"type":"boolean"},"entity_name":{"type":"string"},"id":{"type":"integer"},"portal_url":{"type":["null","string"]},"review_overdue":{"type":"boolean"},"score":{"type":"integer"},"summary":{"type":"string"},"title":{"type":"string"}},"required":["audience","cited","entity_name","id","portal_url","review_overdue","score","summary","title"],"type":"object"},"type":"array"},"words":{"items":{"type":"string"},"type":"array"}},"required":["answers","words"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/answers/{document_id}/use":{"post":{"tags":["service desk"],"summary":"Use Answer","description":"An agent puts a page into their reply: the words to insert, and a\nnote that it was handed over.","operationId":"use_answer_api_v1_requests__request_id__answers__document_id__use_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"text":{"type":"string"},"title":{"type":"string"}},"required":["id","text","title"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/article":{"post":{"tags":["service desk"],"summary":"Article From Request","description":"The answer this request got becomes a page: the question as its\nSymptoms, the last reply as its Fix, filed under the queue's answers,\nthe team's until somebody marks it for requesters. For whoever may\nwrite pages on the desk's entity.","operationId":"article_from_request_api_v1_requests__request_id__article_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"parent_id":{"type":"integer"},"title":{"type":"string"}},"required":["id","parent_id","title"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/triage":{"post":{"tags":["service desk"],"summary":"Triage Request","description":"Ask the assistant what this request is and where it belongs. The\nanswer is written onto the request as suggestions and shown as chips;\nnothing moves until an agent applies one. Metered like a report's\nsummary: the stub answers for nothing, a live model costs credits.","operationId":"triage_request_api_v1_requests__request_id__triage_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"credits_charged":{"type":"integer"},"credits_remaining":{"type":"integer"},"is_live":{"type":"boolean"},"language":{"type":"string"},"note":{"type":"string"},"priority":{"type":"string"},"provider":{"type":"string"},"queue_id":{"type":["null","integer"]},"reasons":{"items":{"type":"string"},"type":"array"},"suggestions":{"properties":{"dismissed":{"type":"boolean"},"language":{"type":"string"},"priority":{"type":"string"},"queue_id":{"type":["null","integer"]},"queue_name":{"type":"string"},"summary":{"type":"string"},"triaged_at":{"type":"string"}},"required":["dismissed","language","priority","queue_id","queue_name","summary","triaged_at"],"type":"object"},"summary":{"type":"string"}},"required":["credits_charged","credits_remaining","is_live","language","note","priority","provider","queue_id","reasons","suggestions","summary"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/answers/rank":{"post":{"tags":["service desk"],"summary":"Rank Answers","description":"Ask the assistant which of the likely answers answers it, with a\nreply drafted from the best - or, where none does, the next step. Asked\nwith the pages the knowledge service found and no others, so what comes\nback is grounded in what the organisation wrote.","operationId":"rank_answers_api_v1_requests__request_id__answers_rank_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"answers":{"items":{"properties":{"audience":{"type":"string"},"cited":{"type":"boolean"},"confidence":{"type":"number"},"entity_name":{"type":"string"},"id":{"type":"integer"},"portal_url":{"type":["null","string"]},"review_overdue":{"type":"boolean"},"score":{"type":"integer"},"summary":{"type":"string"},"title":{"type":"string"},"why":{"type":"string"}},"required":["audience","cited","confidence","entity_name","id","portal_url","review_overdue","score","summary","title","why"],"type":"object"},"type":"array"},"ask_draft":{"type":["null","string"]},"credits_charged":{"type":"integer"},"credits_remaining":{"type":"integer"},"is_live":{"type":"boolean"},"next_step":{"type":"string"},"note":{"type":"string"},"provider":{"type":"string"},"ranked":{"items":{"properties":{"confidence":{"type":"number"},"document_id":{"type":"integer"},"why":{"type":"string"}},"required":["confidence","document_id","why"],"type":"object"},"type":"array"},"reply_draft":{"type":["null","string"]}},"required":["answers","ask_draft","credits_charged","credits_remaining","is_live","next_step","note","provider","ranked","reply_draft"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{request_id}/suggestions/dismiss":{"post":{"tags":["service desk"],"summary":"Dismiss Suggestions","description":"No, thank you: the chips stay away for this request.","operationId":"dismiss_suggestions_api_v1_requests__request_id__suggestions_dismiss_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"suggestions":{"properties":{"dismissed":{"type":"boolean"},"language":{"type":"string"},"priority":{"type":"string"},"queue_id":{"type":"null"},"queue_name":{"type":"string"},"summary":{"type":"string"},"triaged_at":{"type":"string"}},"required":["dismissed","language","priority","queue_id","queue_name","summary","triaged_at"],"type":"object"}},"required":["suggestions"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/queue-rules":{"get":{"tags":["service desk"],"summary":"List Rules","description":"The rules read when a request arrives on this entity, in order.","operationId":"list_rules_api_v1_entities__entity_id__queue_rules_get","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"kinds":{"items":{"type":"string"},"type":"array"},"may_configure":{"type":"boolean"},"rules":{"items":{"properties":{"assignee_id":{"type":"null"},"assignee_name":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"queue_id":{"type":"null"},"queue_name":{"type":"string"},"value":{"type":"string"}},"required":["assignee_id","assignee_name","id","kind","position","priority","queue_id","queue_name","value"],"type":"object"},"type":"array"}},"required":["kinds","may_configure","rules"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["service desk"],"summary":"Create Rule","description":"Add a routing rule, read last, for requests arriving on an entity.\nA rule matches a `domain`, a `keyword` or a `category` against `value`,\nand must do at least one thing: file the request on one of the entity's\nqueues, set its priority, or assign it to a person. Answers with the\nrule's id and position.\n\nThe caller needs the `sprint.manage` right on the entity.","operationId":"create_rule_api_v1_entities__entity_id__queue_rules_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__servicedesk__RuleIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"position":{"type":"integer"}},"required":["id","position"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/queue-rules/{rule_id}":{"put":{"tags":["service desk"],"summary":"Update Rule","description":"Replace what a routing rule matches and what it does, under the same\nrules as adding one. The rule keeps its position. Answers with its id.\nThe caller needs the `sprint.manage` right on the rule's entity.","operationId":"update_rule_api_v1_queue_rules__rule_id__put","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__servicedesk__RuleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Rule Api V1 Queue Rules  Rule Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["service desk"],"summary":"Delete Rule","description":"Delete a routing rule, so that arriving requests are no longer read\nagainst it. The caller needs the `sprint.manage` right on the rule's\nentity.","operationId":"delete_rule_api_v1_queue_rules__rule_id__delete","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Rule Api V1 Queue Rules  Rule Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/queue-rules/order":{"put":{"tags":["service desk"],"summary":"Order Rules","description":"The order the rules are read in: first match wins, so it matters.","operationId":"order_rules_api_v1_entities__entity_id__queue_rules_order_put","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__servicedesk__RuleOrderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"ids":{"items":{"type":"integer"},"type":"array"}},"required":["ids"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/requests/take-next":{"post":{"tags":["service desk"],"summary":"Take Next","description":"Put the caller's name on the most urgent request nobody holds: highest\npriority first, then closest to falling due, the way the list is read.\nAnswers 404 when nothing is waiting, which is good news.","operationId":"take_next_api_v1_entities__entity_id__requests_take_next_post","security":[{"session":[]},{"token":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"integer","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"reference":{"type":"string"},"subject":{"type":"string"}},"required":["id","reference","subject"],"type":"object"}}},"x-dillic-recorded":true},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"securitySchemes":{"session":{"type":"apiKey","description":"The cookie a browser holds after signing in. Programs use a token.","in":"cookie","name":"dillic_session"},"token":{"type":"http","description":"An access token, sent as `Authorization: Bearer dlc_pat_...`. A person makes their own under Access tokens; an administrator installs an app under Administration for a program that is nobody in particular.","scheme":"bearer"}},"schemas":{"BulkIn":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"patch":{"$ref":"#/components/schemas/RequestPatch"}},"type":"object","required":["ids","patch"],"title":"BulkIn","description":"One change to several requests: the ids, and what to do to each."},"CannedIn":{"properties":{"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"}},"type":"object","required":["title","body"],"title":"CannedIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IncidentSeverity":{"type":"string","enum":["sev1","sev2","sev3","sev4"],"title":"IncidentSeverity","description":"How bad an incident is, one to four, the way most operations teams\nsay it. SEV1 and SEV2 are major: they wake the owners of the services\nthey are on."},"QueueIn":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"public":{"type":"boolean","title":"Public","default":true},"response_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Minutes"},"resolution_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resolution Minutes"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"assignment":{"type":"string","title":"Assignment","default":"manual"},"hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hours"},"sla_by_priority":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sla By Priority"}},"type":"object","required":["name"],"title":"QueueIn"},"QueueUpdate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"public":{"type":"boolean","title":"Public"},"response_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Minutes"},"resolution_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resolution Minutes"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"assignment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignment"},"hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hours"},"sla_by_priority":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sla By Priority"}},"type":"object","required":["name","description","public","response_minutes","resolution_minutes","email"],"title":"QueueUpdate","description":"An edit to a queue. Every field required, and that is the point.\n\n`QueueIn` defaults `public` to True, which is right for creation and\ndangerous here: a PUT that only meant to rename a queue would carry no\nvisibility and quietly turn a private queue into an address anybody\noutside can write to. Nothing would raise, and the first sign would be a\nstranger's request in an internal queue.\n\nSo the update has its own model with no defaults. Omitting a field is a\n422 rather than a silent change - a full replace that actually requires\nthe whole thing, which is what PUT was supposed to mean."},"RaiseInsideIn":{"properties":{"kind":{"$ref":"#/components/schemas/RequestKind","default":"request"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body","default":""},"queue_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Id"},"priority":{"$ref":"#/components/schemas/RequestPriority","default":"normal"},"severity":{"anyOf":[{"$ref":"#/components/schemas/IncidentSeverity"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"caused_by_change_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Caused By Change Id"},"problem_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Problem Id"},"service_ids":{"items":{"type":"integer"},"type":"array","title":"Service Ids","default":[]}},"type":"object","required":["subject"],"title":"RaiseInsideIn","description":"A request, an incident or a problem raised from inside the\norganisation, by somebody who answers the desk."},"ReplyIn":{"properties":{"body":{"type":"string","title":"Body"},"internal":{"type":"boolean","title":"Internal","default":false},"then_status":{"anyOf":[{"$ref":"#/components/schemas/RequestStatus"},{"type":"null"}]}},"type":"object","required":["body"],"title":"ReplyIn"},"RequestKind":{"type":"string","enum":["request","incident","problem"],"title":"RequestKind","description":"What a thing on the desk is (plan phase 2).\n\nA request is somebody asking for something. An incident is something\nthat has broken: it carries a severity, when it started, the services\nthat went down and the change that caused it. A problem is the reason\nbehind one or more incidents: it carries a root cause, a known error and\nthe change raised to fix it. One table and one list, because the desk\nreads all three, and three of everything would be three desks."},"RequestPatch":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/RequestStatus"},{"type":"null"}]},"priority":{"anyOf":[{"$ref":"#/components/schemas/RequestPriority"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assignee Id"},"work_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Work Item Id"},"queue_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Id"},"service_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Service Ids"},"severity":{"anyOf":[{"$ref":"#/components/schemas/IncidentSeverity"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"caused_by_change_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Caused By Change Id"},"problem_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Problem Id"},"root_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Cause"},"known_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Known Error"},"fix_change_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fix Change Id"}},"type":"object","title":"RequestPatch"},"RequestPriority":{"type":"string","enum":["low","normal","high","urgent"],"title":"RequestPriority","description":"How soon a request should be looked at, against the others on the desk.\n\nFour rungs and a fixed list, for the reason `RequestStatus` is one: the\ndesk's list is sorted on this before it is sorted on the clock, and a\nladder every organisation wrote for itself would be a ladder the sort\ncould not read. Set by the desk, not by the person asking - everybody's\nown request is urgent - and `NORMAL` until somebody says otherwise."},"RequestStatus":{"type":"string","enum":["new","open","waiting","resolved","closed"],"title":"RequestStatus","description":"Where a service request has got to.\n\nA fixed list, where a work item's statuses are the organisation's own\n(see `WorkflowState`), and the difference is deliberate but it is a cost\nrather than a win. A board's columns are how a team describes its own\nprocess and a ceiling of seven would have been our ceiling on their\nvocabulary; a service request's lifecycle is answering somebody, and the\nthree that matter - has anybody replied, is it our turn, is it over - are\nwhat the clock is measured against. Making them configurable would mean\nasking every account to tell us which of their statuses stop an SLA, which\nis a question with one right answer and several ways to get it wrong.\n\nIf an organisation needs its own words here, the honest fix is the workflow\nengine with a third kind, not a longer enum."},"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"},"WorkItemFromRequestIn":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"level_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level Key"}},"type":"object","title":"WorkItemFromRequestIn","description":"What the work raised from a request is called, and on which rung.\nBoth optional: the request's subject on the ladder's working rung is\nthe right answer nearly every time."},"app__api__servicedesk__RuleIn":{"properties":{"kind":{"type":"string","title":"Kind"},"value":{"type":"string","title":"Value"},"queue_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Id"},"priority":{"anyOf":[{"$ref":"#/components/schemas/RequestPriority"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assignee Id"}},"type":"object","required":["kind","value"],"title":"RuleIn"},"app__api__servicedesk__RuleOrderIn":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"RuleOrderIn"}}}}