{"info":{"title":"Lumen API","version":"0.0.1"},"servers":[{"url":"/v1","description":"development"},{"url":"https://api-qa.lumen.run/v1","description":"staging"},{"url":"https://api.lumen.run/v1","description":"production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"openapi":"3.1.1","paths":{"/request":{"get":{"operationId":"requestRouter.listRequests","summary":"Lists all requests","tags":["Requests"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"number","default":0},"allowEmptyValue":true,"allowReserved":true},{"name":"searchFilter","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"request":{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"displayName":{"type":"string","description":"Human readable and shareable display name"},"template":{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"version":{"type":"string"},"code":{"type":"string"}},"required":["v","id","version","code"]},"name":{"type":"string"},"security":{"enum":["public","restricted","confidential"],"type":"string","description":"The process security setting.\nPublic: public to the internet\nRestricted: restricted to the current organization (everyone has access within the billing account)\nConfidential: confidential to the participants (assignees and requester) of the request"},"segment":{"type":"string"},"status":{"enum":["draft","new","running","onhold","cancelled","completed","rejected"],"type":"string"},"current":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"}]}},"createdBy":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"process":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"reference"},"reference":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"referenceValue":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","reference"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"sequential"},"elements":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"kind":{"const":"step"},"templateId":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"name":{"type":"string"},"description":{"type":"string"},"acquiredByUserID":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{},{}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedAt"]}},"assignees":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"type":"string","pattern":"^g_[\\s\\S]{0,}$"}]},"description":"The assignees set for this step"},"assigneeMatrix":{"anyOf":[{},{},{},{},{}],"description":"The assignee matrix for this step after from which the assignees are derived.\n   This is loaded during the request handler's loadAssignees function.\n   It is always updated in parallel with the assignees field."},"completionCriteria":{"enum":["any","all"],"type":"string","description":"The completion criteria for this step.\n  This is loaded during the request handler's loadAssignees function.\n  It is always updated in parallel with the assignees field."},"agentCanComplete":{"type":"boolean","description":"Copied from the template. When false, an assigned agent may fill fields but must not complete the step."},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"elements":{"anyOf":[{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"v":{},"id":{},"kind":{},"name":{},"templateId":{},"sortOrder":{},"notes":{},"hint":{},"lastUpdatedAt":{},"lastUpdatedBy":{},"currentValue":{},"value":{},"props":{},"default":{},"placeholder":{},"schema":{},"behaviours":{},"hidden":{},"rules":{}}},{"anyOf":[{},{}]}]},{"type":"null"}]}},{"type":"null"}],"description":"Elements describe the task form for this process step.\n   Having elements set to null does not require any input from the assignee matrix and\n   therefore will result in an info only notification for the members of the assignee group."},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","templateId","name","assignees","completionCriteria","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"reference"},"reference":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"referenceValue":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","reference"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"parallel"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"sequential"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{},{}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"http"},"endpoint":{"type":"string"},"method":{"const":"POST"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","endpoint","method"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{},{}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"job"},"target":{"type":"string"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","target"]}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"parallel"},"elements":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"kind":{"const":"step"},"templateId":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"name":{"type":"string"},"description":{"type":"string"},"acquiredByUserID":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{},{}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedAt"]}},"assignees":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"type":"string","pattern":"^g_[\\s\\S]{0,}$"}]},"description":"The assignees set for this step"},"assigneeMatrix":{"anyOf":[{},{},{},{},{}],"description":"The assignee matrix for this step after from which the assignees are derived.\n   This is loaded during the request handler's loadAssignees function.\n   It is always updated in parallel with the assignees field."},"completionCriteria":{"enum":["any","all"],"type":"string","description":"The completion criteria for this step.\n  This is loaded during the request handler's loadAssignees function.\n  It is always updated in parallel with the assignees field."},"agentCanComplete":{"type":"boolean","description":"Copied from the template. When false, an assigned agent may fill fields but must not complete the step."},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"elements":{"anyOf":[{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"v":{},"id":{},"kind":{},"name":{},"templateId":{},"sortOrder":{},"notes":{},"hint":{},"lastUpdatedAt":{},"lastUpdatedBy":{},"currentValue":{},"value":{},"props":{},"default":{},"placeholder":{},"schema":{},"behaviours":{},"hidden":{},"rules":{}}},{"anyOf":[{},{}]}]},{"type":"null"}]}},{"type":"null"}],"description":"Elements describe the task form for this process step.\n   Having elements set to null does not require any input from the assignee matrix and\n   therefore will result in an info only notification for the members of the assignee group."},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","templateId","name","assignees","completionCriteria","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"reference"},"reference":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"referenceValue":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","reference"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"parallel"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"sequential"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{},{}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"http"},"endpoint":{"type":"string"},"method":{"const":"POST"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","endpoint","method"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{},{}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"job"},"target":{"type":"string"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","target"]}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]}]},"rejectionReason":{"type":"string"},"rejectedBy":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"}},"required":["v","id","displayName","template","security","status","current","createdBy","createdAt","process"]},"version":{"type":"string"},"history":{"not":{}},"orgId":{"type":"string","pattern":"^org_[\\s\\S]{0,}$"}},"required":["id","request","history","orgId"]}}}}}}},"post":{"operationId":"requestRouter.createRequest","summary":"Submit a new request with input data","tags":["Requests"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"process":{"type":"object","properties":{"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"version":{"type":"string","description":"If process version is not provided it will default to the latest version of the process."}},"required":["id"]},"data":{"type":"object","propertyNames":{"type":"string","pattern":"^prsc_[\\s\\S]{0,}$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}]},"default":{},"description":"Data object will be validated against the combined schema of the initial step of the process"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}]},"description":"Optional metadata object stored on the request. Used for channel-specific data like conversation references."}},"required":["process"]}}}},"responses":{"201":{"description":"Request created","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"displayName":{"type":"string"},"workflowId":{"type":"string"}},"required":["requestId","displayName","workflowId"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"instancePath":{"type":"string"},"schemaPath":{"type":"string"},"keyword":{"type":"string"},"message":{"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["instancePath","schemaPath","keyword","message","params"]}}},"required":["errors"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/request/{id}":{"get":{"operationId":"requestRouter.findRequest","summary":"Find a request by id","tags":["Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},{"type":"string"}]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"requestStatus":{"enum":["draft","new","running","onhold","cancelled","completed","rejected"],"type":"string"},"request":{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"displayName":{"type":"string","description":"Human readable and shareable display name"},"template":{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"version":{"type":"string"},"code":{"type":"string"}},"required":["v","id","version","code"]},"name":{"type":"string"},"security":{"enum":["public","restricted","confidential"],"type":"string","description":"The process security setting.\nPublic: public to the internet\nRestricted: restricted to the current organization (everyone has access within the billing account)\nConfidential: confidential to the participants (assignees and requester) of the request"},"segment":{"type":"string"},"status":{"enum":["draft","new","running","onhold","cancelled","completed","rejected"],"type":"string"},"current":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"}]}},"createdBy":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"process":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"reference"},"reference":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"referenceValue":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","reference"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"sequential"},"elements":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"kind":{"const":"step"},"templateId":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"name":{"type":"string"},"description":{"type":"string"},"acquiredByUserID":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedByUserID","completedAt"]}},"assignees":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"type":"string","pattern":"^g_[\\s\\S]{0,}$"}]},"description":"The assignees set for this step"},"assigneeMatrix":{"anyOf":[{},{},{},{},{}],"description":"The assignee matrix for this step after from which the assignees are derived.\n   This is loaded during the request handler's loadAssignees function.\n   It is always updated in parallel with the assignees field."},"completionCriteria":{"enum":["any","all"],"type":"string","description":"The completion criteria for this step.\n  This is loaded during the request handler's loadAssignees function.\n  It is always updated in parallel with the assignees field."},"agentCanComplete":{"type":"boolean","description":"Copied from the template. When false, an assigned agent may fill fields but must not complete the step."},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"elements":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prsc_[\\s\\S]{0,}$"},"kind":{"type":"string"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prsc_[\\s\\S]{0,}$"},"sortOrder":{"type":"number"},"notes":{"type":"string","description":"Internal notes to display when hovering or actively editing an element"},"hint":{"type":"string","description":"A hint with more information about the field, displayed under the element. Supports markdown."},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"currentValue":{"description":"The current value of the element"},"value":{"type":"string","description":"Component value is a normalized component reference string for the @dotinc/moar package"},"props":{"description":"Additional component properties which have to be set within the template editor\n  so that they are always provided to a component instance\n  \n  Ideally this is provided by a schema file from the @dotinc/moar registry for the selected version of a component.\n  \n  Additional fixed component properties are defined by the interface LumenComponent,\n  which are mandatory to be implemented by the component publishers."},"default":{},"placeholder":{},"schema":{"not":{}},"behaviours":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"hidden":{"type":"boolean","description":"Whether the component is hidden in the UI"},"rules":{"type":"array","items":{"anyOf":[{},{"type":"null"}]},"description":"The rules for this component"}},"required":["v","id","kind","name","templateId","sortOrder","value","schema"]},{"anyOf":[{"type":"object","properties":{"v":{},"id":{},"kind":{},"templateId":{},"name":{},"repeatable":{},"currentValue":{},"completed":{},"lastUpdatedAt":{},"lastUpdatedBy":{},"assignedAt":{},"executionKind":{},"endpoint":{},"method":{},"headers":{},"skipRules":{},"sortOrder":{}}},{"type":"object","properties":{"v":{},"id":{},"kind":{},"templateId":{},"name":{},"repeatable":{},"currentValue":{},"completed":{},"lastUpdatedAt":{},"lastUpdatedBy":{},"assignedAt":{},"executionKind":{},"target":{},"skipRules":{},"sortOrder":{}}}]}]}},{"type":"null"}],"description":"Elements describe the task form for this process step.\n   Having elements set to null does not require any input from the assignee matrix and\n   therefore will result in an info only notification for the members of the assignee group."},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","templateId","name","assignees","completionCriteria","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"reference"},"reference":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"referenceValue":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","reference"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"parallel"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"sequential"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedByUserID","completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"http"},"endpoint":{"type":"string"},"method":{"const":"POST"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","endpoint","method"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedByUserID","completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"job"},"target":{"type":"string"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","target"]}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"parallel"},"elements":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"kind":{"const":"step"},"templateId":{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"name":{"type":"string"},"description":{"type":"string"},"acquiredByUserID":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedByUserID","completedAt"]}},"assignees":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"type":"string","pattern":"^g_[\\s\\S]{0,}$"}]},"description":"The assignees set for this step"},"assigneeMatrix":{"anyOf":[{},{},{},{},{}],"description":"The assignee matrix for this step after from which the assignees are derived.\n   This is loaded during the request handler's loadAssignees function.\n   It is always updated in parallel with the assignees field."},"completionCriteria":{"enum":["any","all"],"type":"string","description":"The completion criteria for this step.\n  This is loaded during the request handler's loadAssignees function.\n  It is always updated in parallel with the assignees field."},"agentCanComplete":{"type":"boolean","description":"Copied from the template. When false, an assigned agent may fill fields but must not complete the step."},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"elements":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prsc_[\\s\\S]{0,}$"},"kind":{"type":"string"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prsc_[\\s\\S]{0,}$"},"sortOrder":{"type":"number"},"notes":{"type":"string","description":"Internal notes to display when hovering or actively editing an element"},"hint":{"type":"string","description":"A hint with more information about the field, displayed under the element. Supports markdown."},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"currentValue":{"description":"The current value of the element"},"value":{"type":"string","description":"Component value is a normalized component reference string for the @dotinc/moar package"},"props":{"description":"Additional component properties which have to be set within the template editor\n  so that they are always provided to a component instance\n  \n  Ideally this is provided by a schema file from the @dotinc/moar registry for the selected version of a component.\n  \n  Additional fixed component properties are defined by the interface LumenComponent,\n  which are mandatory to be implemented by the component publishers."},"default":{},"placeholder":{},"schema":{"not":{}},"behaviours":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"hidden":{"type":"boolean","description":"Whether the component is hidden in the UI"},"rules":{"type":"array","items":{"anyOf":[{},{"type":"null"}]},"description":"The rules for this component"}},"required":["v","id","kind","name","templateId","sortOrder","value","schema"]},{"anyOf":[{"type":"object","properties":{"v":{},"id":{},"kind":{},"templateId":{},"name":{},"repeatable":{},"currentValue":{},"completed":{},"lastUpdatedAt":{},"lastUpdatedBy":{},"assignedAt":{},"executionKind":{},"endpoint":{},"method":{},"headers":{},"skipRules":{},"sortOrder":{}}},{"type":"object","properties":{"v":{},"id":{},"kind":{},"templateId":{},"name":{},"repeatable":{},"currentValue":{},"completed":{},"lastUpdatedAt":{},"lastUpdatedBy":{},"assignedAt":{},"executionKind":{},"target":{},"skipRules":{},"sortOrder":{}}}]}]}},{"type":"null"}],"description":"Elements describe the task form for this process step.\n   Having elements set to null does not require any input from the assignee matrix and\n   therefore will result in an info only notification for the members of the assignee group."},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","templateId","name","assignees","completionCriteria","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"reference"},"reference":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"referenceValue":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","reference"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"parallel"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"kind":{"const":"process"},"name":{"type":"string"},"templateId":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"executionKind":{"const":"sequential"},"elements":{"type":"array","items":{"anyOf":[{},{"type":"null"}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedByUserID","completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"http"},"endpoint":{"type":"string"},"method":{"const":"POST"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","endpoint","method"]},{"type":"object","properties":{"v":{"const":1},"id":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"kind":{"const":"action"},"templateId":{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},"name":{"type":"string"},"repeatable":{"type":"boolean","description":"Determines whether the process can be repeated dynamically from within the request"},"currentValue":{},"completed":{"type":"array","items":{"type":"object","properties":{"completedByUserID":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"completedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["completedByUserID","completedAt"]}},"lastUpdatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUpdatedBy":{"anyOf":[{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},{"const":"u_system"}]},"assignedAt":{"type":"string","format":"date-time","x-native-type":"date","description":"Record the time of assignment to this step"},"executionKind":{"const":"job"},"target":{"type":"string"},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]},"sortOrder":{"type":"number"}},"required":["v","id","kind","templateId","name","executionKind","target"]}]}},"skipRules":{"type":"object","properties":{"language":{"enum":["cel","lua"],"type":"string"},"expression":{"type":"string"}},"required":["expression"]}},"required":["v","id","kind","name","templateId","executionKind","elements"]}]},"rejectionReason":{"type":"string"},"rejectedBy":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"}},"required":["v","id","displayName","template","security","status","current","createdBy","createdAt","process"]},"currentTaskIDs":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"}]}}},"required":["id","requestStatus","request","currentTaskIDs"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/process/{id}/schema":{"get":{"operationId":"requestRouter.getProcessInputSchema","summary":"Get the schema for the initial form of a process","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"}},{"name":"version","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"step","in":"query","schema":{"anyOf":[{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},{"type":"number"}]},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{}}}}},"/auth/csrf":{"get":{"operationId":"auth.getCsrfToken","summary":"Creates a new CSRF token","tags":["Authentication"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"csrfToken":{"type":"string"}},"required":["csrfToken"]}}}}}}},"/me":{"get":{"operationId":"me.getMe","summary":"Return the authenticated actor","tags":["Identity"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"kind":{"enum":["user","app_user"],"type":"string"},"name":{"type":"string"},"orgId":{"type":"string","pattern":"^org_[\\s\\S]{0,}$"},"oauthAppId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","kind","name","scopes"]}}}}}}},"/pki/csr/generate":{"post":{"operationId":"pki.generateCSR","summary":"Generate a Certificate Signing Request (CSR)","description":"Generates a new key pair and CSR for certificate issuance. The private key is returned once and should be stored securely by the client.","tags":["PKI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commonName":{"type":"string"},"subjectAltNames":{"type":"array","items":{"type":"string"}},"keyAlgorithm":{"enum":["RSA","ECDSA"],"type":"string","default":"ECDSA"},"keySize":{"anyOf":[{"const":2048},{"const":4096}]},"curve":{"enum":["P-256","P-384","P-521"],"type":"string"}},"required":["commonName"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"csr":{"type":"string"},"privateKey":{"type":"string"},"publicKey":{"type":"string"}},"required":["csr","privateKey","publicKey"]}}}}}}},"/agent-sessions/{id}":{"get":{"operationId":"agentSessionRouter.findAgentSession","summary":"Get an agent session by id","tags":["Agent sessions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"},"state":{"enum":["pending","active","error","awaitingInput","complete","stale"],"type":"string"},"requestId":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"stepId":{"anyOf":[{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"}]},"agentId":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"organizationId":{"type":"string","pattern":"^org_[\\s\\S]{0,}$"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"stopped":{"type":"boolean"},"plan":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"status":{"enum":["pending","inProgress","completed","canceled"],"type":"string"}},"required":["content","status"]}},"externalUrls":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"]}},"activities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["thought","action","elicitation","response","error","prompt"],"type":"string"},"body":{"type":"string"},"completion":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","body","createdAt"]}}},"required":["id","state","requestId","stepId","agentId","organizationId","createdAt","stopped","plan","externalUrls","activities"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"patch":{"operationId":"agentSessionRouter.updateAgentSession","summary":"Replace the session plan and external URLs","tags":["Agent sessions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"status":{"enum":["pending","inProgress","completed","canceled"],"type":"string"}},"required":["content","status"]}},"externalUrls":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"]}}},"required":["plan","externalUrls"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"},"state":{"enum":["pending","active","error","awaitingInput","complete","stale"],"type":"string"},"requestId":{"type":"string","pattern":"^req_[\\s\\S]{0,}$"},"stepId":{"anyOf":[{"type":"string","pattern":"^prs_[\\s\\S]{0,}$"},{"type":"string","pattern":"^pra_[\\s\\S]{0,}$"},{"type":"string","pattern":"^prc_[\\s\\S]{0,}$"}]},"agentId":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"organizationId":{"type":"string","pattern":"^org_[\\s\\S]{0,}$"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"stopped":{"type":"boolean"},"plan":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"status":{"enum":["pending","inProgress","completed","canceled"],"type":"string"}},"required":["content","status"]}},"externalUrls":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"]}}},"required":["id","state","requestId","stepId","agentId","organizationId","createdAt","stopped","plan","externalUrls"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent-sessions/{id}/activities":{"post":{"operationId":"agentSessionRouter.createAgentSessionActivity","summary":"Post an agent activity (thought, action, error, elicitation, or response from the app; prompt from people). A response finishes the step; write field values first with POST /agent-sessions/{id}/fields, or pass completion.","tags":["Agent sessions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"enum":["thought","action","elicitation","response","error","prompt"],"type":"string"},"body":{"type":"string"},"signal":{"enum":["stop","select","auth"],"type":"string"},"signalMetadata":{},"completion":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"idempotencyKey":{"type":"string"}},"required":["type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"type":{"enum":["thought","action","elicitation","response","error","prompt"],"type":"string"},"body":{"type":"string"},"signal":{"enum":["stop","select","auth"],"type":"string"},"signalMetadata":{"anyOf":[{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"]}}},"required":["options"]},{"type":"object","properties":{"url":{"type":"string"},"userId":{"type":"string","pattern":"^u_[\\s\\S]{0,}$"},"providerName":{"type":"string"}},"required":["url"]}]},"completion":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","sessionId","type","body","createdAt"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent-sessions/{id}/fields":{"post":{"operationId":"agentSessionRouter.updateAgentSessionStepFields","summary":"Write values to fields of the session step without completing it. Post a response activity to finish the step.","tags":["Agent sessions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"idempotencyKey":{"type":"string"}},"required":["values"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ags_[\\s\\S]{0,}$"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","values"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}},"required":["id","error"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}}}}