{"openapi":"3.1.0","info":{"title":"Leap API","version":"1.0.0","description":"Read and change Leap's core model with a machine member's leap_ token. Summit only. A token reads only the resources its scope names (x-leap-scope on each operation; time entries only when named), and only a write token writes (x-leap-mode). Responses never carry money or leave types, and carry email only on people. Guide: https://www.goleap.io/developers."},"servers":[{"url":"/api/v1"}],"security":[{"leapToken":[]}],"components":{"securitySchemes":{"leapToken":{"type":"http","scheme":"bearer","bearerFormat":"leap_"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]},"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"slug":{"type":["string","null"]},"timezone":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","slug","timezone","created_at"]},"Project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":["string","null"]},"name":{"type":["string","null"]},"status":{"type":["string","null"]},"description":{"type":["string","null"]},"is_internal":{"type":["boolean","null"]},"engagement_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","key","name","status","description","is_internal","engagement_id","created_at","updated_at"],"description":"Flow projects: the containers that hold work items."},"Engagement":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"status":{"type":["string","null"]},"client_id":{"type":["string","null"],"format":"uuid"},"start_date":{"type":["string","null"],"format":"date"},"end_date":{"type":["string","null"],"format":"date"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","status","client_id","start_date","end_date","created_at","updated_at"],"description":"Grove engagements: client work. No fee, budget, rate or margin."},"Team":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":["string","null"]},"name":{"type":["string","null"]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","key","name","archived_at","created_at"],"description":"Teams that plan and deliver work."},"Timebox":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"status":{"type":["string","null"]},"goal":{"type":["string","null"]},"start_date":{"type":["string","null"],"format":"date"},"end_date":{"type":["string","null"],"format":"date"},"team_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","status","goal","start_date","end_date","team_id","created_at"],"description":"A team's timebox (sprint, iteration or period, in the workspace's own words)."},"WorkItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":["string","null"]},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"type":["string","null"]},"status":{"type":["string","null"]},"priority":{"type":["string","null"]},"points":{"type":["number","null"]},"labels":{"type":["array","null"],"items":{"type":"string"}},"assignee_id":{"type":["string","null"],"format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"team_id":{"type":["string","null"],"format":"uuid"},"timebox_id":{"type":["string","null"],"format":"uuid"},"parent_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","key","title","description","type","status","priority","points","labels","assignee_id","project_id","team_id","timebox_id","parent_id","created_at","updated_at"],"description":"Stories, bugs, tasks and subtasks."},"Person":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"auth_user_id":{"type":["string","null"],"format":"uuid"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"role":{"type":["string","null"]},"status":{"type":["string","null"]},"is_machine":{"type":["boolean","null"]},"avatar_url":{"type":["string","null"]}},"required":["id","auth_user_id","first_name","last_name","email","role","status","is_machine","avatar_url"],"description":"The workspace's members, people and machine users: names, email and role. `id` is the one a work item's assignee_id names; `auth_user_id` is the one a time entry's user_id names. Never a cost, rate, capacity or leave."},"TimeEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":["string","null"],"format":"uuid"},"date":{"type":"string","format":"date"},"hours":{"type":"number"},"is_billable":{"type":["boolean","null"]},"category":{"type":["string","null"]},"status":{"type":["string","null"]},"project_id":{"type":["string","null"],"format":"uuid"},"engagement_id":{"type":["string","null"],"format":"uuid"},"work_item_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","user_id","date","hours","is_billable","category","status","project_id","engagement_id","work_item_id","created_at","updated_at"],"description":"Logged hours, as time_entries RLS lets the token read them. Never a rate or an amount."},"WorkItemCreate":{"type":"object","additionalProperties":false,"properties":{"project_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["story","bug","task","subtask"]},"parent_id":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"],"maxLength":50000,"description":"Plain text or simple HTML."},"status":{"type":"string","enum":["New","Needs Refinement","Ready","In Progress","Testing","Done"]},"priority":{"type":["string","null"],"enum":["High","Medium","Low"]},"points":{"type":["integer","null"],"minimum":0,"maximum":100},"labels":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":50},"maxItems":50},"assignee_id":{"type":["string","null"],"format":"uuid"},"timebox_id":{"type":["string","null"],"format":"uuid"},"team_id":{"type":["string","null"],"format":"uuid"}},"required":["title"]},"WorkItemUpdate":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"],"maxLength":50000,"description":"Plain text or simple HTML."},"status":{"type":"string","minLength":1,"maxLength":100},"priority":{"type":["string","null"],"enum":["High","Medium","Low"]},"points":{"type":["integer","null"],"minimum":0,"maximum":100},"labels":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":50},"maxItems":50},"assignee_id":{"type":["string","null"],"format":"uuid"},"timebox_id":{"type":["string","null"],"format":"uuid"},"team_id":{"type":["string","null"],"format":"uuid"}}},"CommentCreate":{"type":"object","additionalProperties":false,"properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"mentioned_user_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20}},"required":["body"]},"Comment":{"type":"object","properties":{"id":{"type":["string","null"],"format":"uuid"},"work_item_id":{"type":"string","format":"uuid"},"body":{"type":"string"},"mentioned_user_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_at":{"type":["string","null"],"format":"date-time"}}},"TimeEntryCreate":{"type":"object","additionalProperties":false,"properties":{"user_id":{"type":"string","format":"uuid"},"date":{"type":"string"},"hours":{"type":"number","minimum":0,"maximum":24},"is_billable":{"type":"boolean"},"category":{"type":["string","null"],"enum":["development","design","testing","meeting","admin","other"]},"description":{"type":["string","null"],"maxLength":2000},"project_id":{"type":["string","null"],"format":"uuid"},"work_item_id":{"type":["string","null"],"format":"uuid"}},"required":["date","hours"]},"TimeEntryUpdate":{"type":"object","additionalProperties":false,"properties":{"date":{"type":"string"},"hours":{"type":"number","minimum":0,"maximum":24},"is_billable":{"type":"boolean"},"category":{"type":["string","null"],"enum":["development","design","testing","meeting","admin","other"]},"description":{"type":["string","null"],"maxLength":2000}}},"TimeWeekSubmit":{"type":"object","additionalProperties":false,"properties":{"user_id":{"type":"string","format":"uuid"},"week_start":{"type":"string"}},"required":["week_start"]}}},"paths":{"/workspace":{"get":{"summary":"The token's workspace","operationId":"getWorkspace","responses":{"200":{"description":"The workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Workspace"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects":{"get":{"summary":"List projects","description":"Flow projects: the containers that hold work items.","operationId":"list_projects","x-leap-scope":"projects","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."},{"name":"engagement_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."}],"responses":{"200":{"description":"A page, ordered by id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}":{"get":{"summary":"Get one project","operationId":"get_projects","x-leap-scope":"projects","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The project's id."}],"responses":{"200":{"description":"The project.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/engagements":{"get":{"summary":"List engagements","description":"Grove engagements: client work. No fee, budget, rate or margin.","operationId":"list_engagements","x-leap-scope":"engagements","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."},{"name":"client_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."}],"responses":{"200":{"description":"A page, ordered by id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Engagement"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/engagements/{id}":{"get":{"summary":"Get one engagement","operationId":"get_engagements","x-leap-scope":"engagements","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The engagement's id."}],"responses":{"200":{"description":"The engagement.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Engagement"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams":{"get":{"summary":"List teams","description":"Teams that plan and deliver work.","operationId":"list_teams","x-leap-scope":"teams","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."}],"responses":{"200":{"description":"A page, ordered by id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Team"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/{id}":{"get":{"summary":"Get one team","operationId":"get_teams","x-leap-scope":"teams","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The team's id."}],"responses":{"200":{"description":"The team.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Team"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/timeboxes":{"get":{"summary":"List timeboxes","description":"A team's timebox (sprint, iteration or period, in the workspace's own words).","operationId":"list_timeboxes","x-leap-scope":"timeboxes","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"team_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."}],"responses":{"200":{"description":"A page, ordered by id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Timebox"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/timeboxes/{id}":{"get":{"summary":"Get one timebox","operationId":"get_timeboxes","x-leap-scope":"timeboxes","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The timebox's id."}],"responses":{"200":{"description":"The timebox.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Timebox"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/work-items":{"get":{"summary":"List work items","description":"Stories, bugs, tasks and subtasks.","operationId":"list_work_items","x-leap-scope":"work-items","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"project_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"team_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"timebox_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"assignee_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."},{"name":"type","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."},{"name":"updated_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Changed at or after this time."}],"responses":{"200":{"description":"A page, ordered by id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a work item","description":"Creates a story, bug, task or subtask for the person the token acts for, through the same path a hand edit takes (validation, audit row, automation, bells). A subtask names its parent_id and no project_id.","operationId":"create_work_item","x-leap-scope":"work-items","x-leap-mode":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Retrying with the same key creates the work item once; a repeat answers 200 with the first one and Idempotent-Replayed: true."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemCreate"}}}},"responses":{"200":{"description":"A retry with the same Idempotency-Key: the work item it created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WorkItem"}}}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WorkItem"}}}}}},"400":{"description":"code invalid_request: the body is not valid (details names each field), or invalid_json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code read_only: a read token can't write. scope_refused: the token's scope doesn't name work items. forbidden: the machine user may not change this. workspace_frozen.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/work-items/{id}":{"get":{"summary":"Get one work item","operationId":"get_work_items","x-leap-scope":"work-items","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The work item's id, or its key (e.g. PLAT-12)."}],"responses":{"200":{"description":"The work item.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WorkItem"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a work item","description":"Changes only the fields named, as a hand edit does (status moves run the workflow; an assignee gets their bell).","operationId":"update_work_item","x-leap-scope":"work-items","x-leap-mode":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The work item's id, or its key (e.g. PLAT-12)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemUpdate"}}}},"responses":{"200":{"description":"The work item as it is now.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WorkItem"}}}}}},"400":{"description":"code invalid_request: the body is not valid (details names each field), or invalid_json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code read_only: a read token can't write. scope_refused: the token's scope doesn't name work items. forbidden: the machine user may not change this. workspace_frozen.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/people":{"get":{"summary":"List people","description":"The workspace's members, people and machine users: names, email and role. `id` is the one a work item's assignee_id names; `auth_user_id` is the one a time entry's user_id names. Never a cost, rate, capacity or leave.","operationId":"list_people","x-leap-scope":"people","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."},{"name":"role","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."}],"responses":{"200":{"description":"A page, ordered by id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/people/{id}":{"get":{"summary":"Get one person","operationId":"get_people","x-leap-scope":"people","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The person's id."}],"responses":{"200":{"description":"The person.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Person"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/time-entries":{"get":{"summary":"List time entries","description":"Logged hours, as time_entries RLS lets the token read them. Never a rate or an amount.","operationId":"list_time_entries","x-leap-scope":"time-entries","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"On or after this date."},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"On or before this date."},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"project_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"engagement_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"work_item_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Equals."},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":60},"description":"Equals."}],"responses":{"200":{"description":"A page, ordered by id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeEntry"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Log time","description":"Logs a draft entry for the person the token acts for, through the timesheet's own path (their RLS, the rate snapshot, the period locks). Never for anyone else.","operationId":"create_time_entry","x-leap-scope":"time-entries","x-leap-mode":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryCreate"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TimeEntry"}}}}}},"400":{"description":"code invalid_request: the body is not valid (details names each field), or invalid_json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Anyone else's time (not_your_persons_time), a scope without time entries, or a read token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/time-entries/{id}":{"get":{"summary":"Get one time entry","operationId":"get_time_entries","x-leap-scope":"time-entries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The time entry's id."}],"responses":{"200":{"description":"The time entry.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TimeEntry"}}}}}},"400":{"description":"A parameter is unknown or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code scope_refused: the token's scope doesn't name this resource. Scopes are chosen when the token is minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a time entry","description":"Changes a draft or rejected entry of the person the token acts for. Never a status: an agent never approves or rejects time, and submits a week with /time-entries/submit.","operationId":"update_time_entry","x-leap-scope":"time-entries","x-leap-mode":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The entry's id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryUpdate"}}}},"responses":{"200":{"description":"The entry as it is now.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TimeEntry"}}}}}},"400":{"description":"code invalid_request: the body is not valid (details names each field), or invalid_json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Anyone else's time (not_your_persons_time), a scope without time entries, or a read token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/work-items/{id}/comments":{"post":{"summary":"Comment on a work item","description":"Adds a plain-text comment to the work item's thread for the person the token acts for (it reads \"By an agent\"). Each person in mentioned_user_ids gets a bell.","operationId":"create_work_item_comment","x-leap-scope":"work-items","x-leap-mode":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The work item's id, or its key (e.g. PLAT-12)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"The comment.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Comment"}}}}}},"400":{"description":"code invalid_request: the body is not valid (details names each field), or invalid_json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"code read_only: a read token can't write. scope_refused: the token's scope doesn't name work items. forbidden: the machine user may not change this. workspace_frozen.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/time-entries/submit":{"post":{"summary":"Submit a week","description":"Submits the week (Monday to Sunday) of the person the token acts for: every draft and rejected entry, and the week's expenses, in one transaction. It lands in Approvals exactly as their own submission would.","operationId":"submit_time_week","x-leap-scope":"time-entries","x-leap-mode":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeWeekSubmit"}}}},"responses":{"200":{"description":"What went for review: counts and hours, never an amount.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"week_start":{"type":"string","format":"date"},"submitted":{"type":"integer"},"hours":{"type":"number"},"expenses":{"type":"integer"}}}}}}}},"400":{"description":"code invalid_request: the body is not valid (details names each field), or invalid_json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No leap_ token, or the token is invalid, expired, revoked, idle, or its workspace is not on Summit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Anyone else's time (not_your_persons_time), a scope without time entries, or a read token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}