The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (olfm_…) as the bearer. Every request is signed by the machine’s host key, the same profile as a runner key; the first request carries the host key in hostKey and binds the machine to it. A request from an address the machine does not allow is refused with machine_source_refused, and a request from a revoked machine with machine_revoked. The request is also the machine’s heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization’s max_managed_builds limit, and only a build that fits the machine’s room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OuterLayer","description":"An open-source software factory: issue in, reviewed and verified code out, on your agents, in your repos.","colors":{"primary":"#2065D1","light":"#4C8DEE","dark":"#1A55B8"},"logo":{"light":"https://mintcdn.com/outerlayer-stg/h46SL2WH_1X-gmFL/logo/light.svg?fit=max\u0026auto=format\u0026n=h46SL2WH_1X-gmFL\u0026q=85\u0026s=de563af4ba1bc24d13a1c4a7485a2182","dark":"https://mintcdn.com/outerlayer-stg/h46SL2WH_1X-gmFL/logo/dark.svg?fit=max\u0026auto=format\u0026n=h46SL2WH_1X-gmFL\u0026q=85\u0026s=13e7346de4086ea4a5f7e83a85e7a072"},"favicon":"https://mintcdn.com/outerlayer-stg/h46SL2WH_1X-gmFL/favicon.svg?fit=max\u0026auto=format\u0026n=h46SL2WH_1X-gmFL\u0026q=85\u0026s=adddaf2c470259ec7193c6bd26a95252","appearance":{"default":"system"},"background":{"color":{"light":"#FAFAF9","dark":"#131312"}},"navbar":{"links":[{"href":"/changelog","label":"Changelog"},{"href":"https://github.com/outerlayerai/outerlayer","label":"GitHub"}],"primary":{"type":"button","label":"Open the app","href":"https://app.outerlayer.ai"}},"footer":{"socials":{"github":"https://github.com/outerlayerai/outerlayer","website":"https://www.outerlayer.ai"}},"fonts":{"family":"Geist"},"styling":{"codeblocks":"system","latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"outerlayer-stg","hasAudioNarration":false,"actualSubdomain":"outerlayer-stg","customDomains":["docs-stg.outerlayer.ai"],"gitSource":{"type":"github","owner":"outerlayerai","repo":"outerlayer","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ae0958b663d8e17af00d6fc","collectionId":"36c7fc05-2f93-4d6d-a098-3678ea016246","liveDeploymentHistoryId":"6ae0958b663d8e17af00d6fc","schemaVersion":"v3"},"entitlements":{},"buildId":"6ae0969d6c1a15a18d9d9f18","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API reference","count":108},{"language":"default","tag":"Endpoints","count":106},{"language":"default","tag":"Documentation","count":42},{"language":"default","tag":"Work Items","count":28},{"language":"default","tag":"Apps","count":20},{"language":"default","tag":"CLI reference","count":13},{"language":"default","tag":"Run builds","count":12},{"language":"default","tag":"Commands","count":9},{"language":"default","tag":"Org Management","count":9},{"language":"default","tag":"Work on an item","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n.font-mono,code,kbd,pre,samp{font-family:\"JetBrains Mono\",ui-monospace,SFMono-Regular,Menlo,monospace}.status-icon{display:inline-block;width:1.05em;height:1.05em;margin-right:.35em;vertical-align:-.17em;color:#61656f}.status-icon-not_picked_up,.status-icon-with_agent{color:#b26a00}.status-icon-ready_for_review{color:#2e7d32}.status-icon-approved{color:#4f55c9}.status-icon-needs_attention{color:#c62828}.status-icon-dot{fill:#c2410c}.dark .status-icon{color:#9a9eab}.dark .status-icon-not_picked_up,.dark .status-icon-with_agent{color:#f0a742}.dark .status-icon-ready_for_review{color:#6cc070}.dark .status-icon-approved{color:#959bf2}.dark .status-icon-needs_attention{color:#f2827a}.dark .status-icon-dot{fill:#f08a4b}"}],"page":{"pagePath":"api-reference/fleet/ask-for-the-next-managed-build","slug":"/api-reference/fleet/ask-for-the-next-managed-build","pageMetadata":{"title":"Ask for the next managed build","description":"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (`olfm_…`) as the bearer. Every request is signed by the machine's host key, the same profile as a runner key; the first request carries the host key in `hostKey` and binds the machine to it. A request from an address the machine does not allow is refused with `machine_source_refused`, and a request from a revoked machine with `machine_revoked`. The request is also the machine's heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization's `max_managed_builds` limit, and only a build that fits the machine's room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/fleet/next","href":"/api-reference/fleet/ask-for-the-next-managed-build","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (\", _jsx(_components.code, {\n children: \"olfm_…\"\n }), \") as the bearer. Every request is signed by the machine’s host key, the same profile as a runner key; the first request carries the host key in \", _jsx(_components.code, {\n children: \"hostKey\"\n }), \" and binds the machine to it. A request from an address the machine does not allow is refused with \", _jsx(_components.code, {\n children: \"machine_source_refused\"\n }), \", and a request from a revoked machine with \", _jsx(_components.code, {\n children: \"machine_revoked\"\n }), \". The request is also the machine’s heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization’s \", _jsx(_components.code, {\n children: \"max_managed_builds\"\n }), \" limit, and only a build that fits the machine’s room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Ask for the next managed build","description":"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (`olfm_…`) as the bearer. Every request is signed by the machine's host key, the same profile as a runner key; the first request carries the host key in `hostKey` and binds the machine to it. A request from an address the machine does not allow is refused with `machine_source_refused`, and a request from a revoked machine with `machine_revoked`. The request is also the machine's heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization's `max_managed_builds` limit, and only a build that fits the machine's room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/fleet/next","href":"/api-reference/fleet/ask-for-the-next-managed-build","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (`olfm_…`) as the bearer. Every request is signed by the machine's host key, the same profile as a runner key; the first request carries the host key in `hostKey` and binds the machine to it. A request from an address the machine does not allow is refused with `machine_source_refused`, and a request from a revoked machine with `machine_revoked`. The request is also the machine's heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization's `max_managed_builds` limit, and only a build that fits the machine's room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.","operationId":"fleet-next","parameters":["803ce70e-b769-46d1-8049-00b1148b6fb3","068c5faf-dcc5-452c-9b6a-cc443c5057a2","297727c4-23f8-4969-909a-6935626921ce"],"requestBody":"c34fb9ce-b810-4e6e-a73c-13f6985763f4","responses":{"200":"c0169979-a6c4-42d5-b304-a75d6e30b645","400":"28b6aa3f-445b-4c40-a0d0-b167878d3b54","401":"9c20c5e7-3528-41a7-8376-1e98407b1020","403":"6a637cfa-759d-4226-87f6-8c17aabe395d","404":"d242b2f4-e7c1-4829-b2bf-f4f17245a662"},"security":["aefdafa6-68fc-43d4-a22a-e3835f30342c"],"summary":"Ask for the next managed build","tags":["Fleet"],"method":"post","type":"path","servers":["a95c711b-5d82-4a87-b042-c84fdafe7b0f","5826d86e-15e9-4718-90d4-2ee0908f9615"],"path":"/v1/fleet/next","baseUrlOptions":["https://api.outerlayer.ai","http://localhost:9418"],"title":"Ask for the next managed build","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"803ce70e-b769-46d1-8049-00b1148b6fb3":{"description":"HTTP Message Signature (RFC 9421) made with the runner key's host key: `runner=:\u003cbase64>:`.","in":"header","name":"Signature","required":false,"schema":{"description":"HTTP Message Signature (RFC 9421) made with the runner key's host key: `runner=:\u003cbase64>:`.","type":"string","isRequired":false,"uniqueKey":"","typeLabel":"string"}},"068c5faf-dcc5-452c-9b6a-cc443c5057a2":{"description":"The signature's covered components and parameters: `runner=(\"@method\" \"@path\" \"@query\" \"content-digest\");created=\u003cunix seconds>;nonce=\"\u003crandom>\";keyid=\"\u003chost key fingerprint>\";alg=\"ed25519\"`.","in":"header","name":"Signature-Input","required":false,"schema":{"description":"The signature's covered components and parameters: `runner=(\"@method\" \"@path\" \"@query\" \"content-digest\");created=\u003cunix seconds>;nonce=\"\u003crandom>\";keyid=\"\u003chost key fingerprint>\";alg=\"ed25519\"`.","type":"string","isRequired":false,"uniqueKey":"","typeLabel":"string"}},"297727c4-23f8-4969-909a-6935626921ce":{"description":"RFC 9530 digest of the request body, always sent, including for a request with none: `sha-256=:\u003cbase64>:`.","in":"header","name":"Content-Digest","required":false,"schema":{"description":"RFC 9530 digest of the request body, always sent, including for a request with none: `sha-256=:\u003cbase64>:`.","type":"string","isRequired":false,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"cliVersion":{"maxLength":100,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"cliVersion","typeLabel":"string"},"free":{"description":"The room the machine has free now.","properties":{"diskGB":{"maximum":1000000000,"minimum":0,"type":"number","isRequired":true,"uniqueKey":"free.diskGB","typeLabel":"number"},"memoryGiB":{"maximum":1000000,"minimum":0,"type":"number","isRequired":true,"uniqueKey":"free.memoryGiB","typeLabel":"number"},"vcpus":{"maximum":1000000,"minimum":0,"type":"number","isRequired":true,"uniqueKey":"free.vcpus","typeLabel":"number"}},"required":["memoryGiB","vcpus","diskGB"],"type":"object","isRequired":true,"uniqueKey":"free","typeLabel":"object"},"images":{"description":"The repositories, as `owner/repo`, whose build images the machine holds.","items":{"maxLength":255,"minLength":1,"type":"string","uniqueKey":"images.items.[INDEX]","typeLabel":"string"},"maxItems":500,"type":"array","isRequired":true,"uniqueKey":"images","typeLabel":"string[]"},"runnerProtocol":{"type":"integer","isRequired":true,"uniqueKey":"runnerProtocol","typeLabel":"integer"},"total":{"description":"The room the machine has in all: memory in GiB, cores and disk in GB.","properties":{"diskGB":{"maximum":1000000000,"minimum":0,"type":"number","isRequired":true,"uniqueKey":"total.diskGB","typeLabel":"number"},"memoryGiB":{"maximum":1000000,"minimum":0,"type":"number","isRequired":true,"uniqueKey":"total.memoryGiB","typeLabel":"number"},"vcpus":{"maximum":1000000,"minimum":0,"type":"number","isRequired":true,"uniqueKey":"total.vcpus","typeLabel":"number"}},"required":["memoryGiB","vcpus","diskGB"],"type":"object","isRequired":true,"uniqueKey":"total","typeLabel":"object"},"hostKey":{"pattern":"^[A-Za-z0-9_-]{43}$","type":"string","uniqueKey":"hostKey","typeLabel":"string"}},"required":["total","free","images","cliVersion","runnerProtocol"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"cliVersion":"\u003cstring>","free":{"diskGB":500000000,"memoryGiB":500000,"vcpus":500000},"images":["\u003cstring>"],"runnerProtocol":123,"total":{"diskGB":500000000,"memoryGiB":500000,"vcpus":500000},"hostKey":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"c0169979-a6c4-42d5-b304-a75d6e30b645":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"claim":{"oneOf":[{"description":"The build handed out, with the lease the machine now holds, or `null` when no build fits.","properties":{"appId":{"description":"The factory the work item belongs to.","type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.appId","typeLabel":"string"},"branch":{"oneOf":[{"description":"The branch the build works on in the primary repository: the head branch of the item's one open pull request there, or `outerlayer/\u003cfactory>/\u003citem number>` when it has none. `null` only for a lease recorded before claims named a branch.","type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.branch.oneOf.0","typeLabel":"string"},{"description":"The branch the build works on in the primary repository: the head branch of the item's one open pull request there, or `outerlayer/\u003cfactory>/\u003citem number>` when it has none. `null` only for a lease recorded before claims named a branch.","type":"null","isRequired":true,"uniqueKey":"data.claim.oneOf.0.branch.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.claim.oneOf.0.branch","typeLabel":"string | null"},"createdAt":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.createdAt","typeLabel":"string"},"expiresAt":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.expiresAt","typeLabel":"string"},"host":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.host","typeLabel":"string"},"id":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.id","typeLabel":"string"},"itemKey":{"description":"A signed key, prefixed `olitem_`, that acts only on this work item and only while this lease is live. The runner gives it to the build as its API key. A claim by the lease's own holder returns the same key.","type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.itemKey","typeLabel":"string"},"kind":{"enum":["implement","amend"],"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"repositories":{"description":"Every repository the build checks out, the primary first and the others in name order. A factory with one connected repository names one. Each repository has the head branch of the item's one open pull request there, or `outerlayer/\u003cfactory>/\u003citem number>` when it has none. Empty when the item names no repository and the factory has connected none.","items":{"properties":{"branch":{"description":"The branch the build works on in this repository.","type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.repositories.items.[INDEX].branch","typeLabel":"string"},"primary":{"description":"`true` for the one repository the item itself lives in or, failing that, the first the claim chose.","type":"boolean","isRequired":true,"uniqueKey":"data.claim.oneOf.0.repositories.items.[INDEX].primary","typeLabel":"boolean"},"repository":{"description":"The repository, as lower-case `owner/repo`.","type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.repositories.items.[INDEX].repository","typeLabel":"string"}},"required":["repository","branch","primary"],"type":"object","uniqueKey":"data.claim.oneOf.0.repositories.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"data.claim.oneOf.0.repositories","typeLabel":"object[]"},"size":{"description":"The size of the machine the build needs.","enum":["small","large"],"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.size","typeLabel":"enum\u003cstring>"},"workItemId":{"description":"The id of the work item the lease is on.","type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.workItemId","typeLabel":"string"},"coAuthor":{"description":"The member who asked for the build, for the `Co-authored-by` line the runner adds to each commit. The address is `\u003cgithub-user-id>+\u003clogin>@users.noreply.github.com`, from the GitHub account the member signed in with. Absent when the build has no requester who is a member of the org, when the requester signed in without GitHub, and when `commitAuthor` is absent.","properties":{"email":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.coAuthor.email","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.coAuthor.name","typeLabel":"string"}},"required":["name","email"],"type":"object","uniqueKey":"data.claim.oneOf.0.coAuthor","typeLabel":"object"},"commitAuthor":{"description":"The identity every commit the build makes is authored and committed under: the GitHub App's bot account, named `\u003cslug>[bot]`, with the address `\u003cbot-user-id>+\u003cslug>[bot]@users.noreply.github.com`. Absent on a gateway that holds no GitHub App keys.","properties":{"email":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.commitAuthor.email","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.commitAuthor.name","typeLabel":"string"}},"required":["name","email"],"type":"object","uniqueKey":"data.claim.oneOf.0.commitAuthor","typeLabel":"object"},"unreachable":{"description":"Repositories the factory links that this claim leaves out because the GitHub App installation that reaches them is suspended on GitHub. The item's own repository is never listed here: a suspended installation there refuses the claim with `repository_not_reachable`. Always present, as an empty list when nothing was left out.","items":{"properties":{"reason":{"description":"Why the claim leaves the repository out.","enum":["installation_suspended"],"type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.unreachable.items.[INDEX].reason","typeLabel":"enum\u003cstring>"},"repository":{"description":"The repository, as lower-case `owner/repo`.","type":"string","isRequired":true,"uniqueKey":"data.claim.oneOf.0.unreachable.items.[INDEX].repository","typeLabel":"string"}},"required":["repository","reason"],"type":"object","uniqueKey":"data.claim.oneOf.0.unreachable.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"data.claim.oneOf.0.unreachable","typeLabel":"object[]"}},"required":["id","host","kind","createdAt","expiresAt","branch","repositories","itemKey","workItemId","appId","size"],"type":"object","isRequired":true,"uniqueKey":"data.claim.oneOf.0","typeLabel":"object"},{"description":"The build handed out, with the lease the machine now holds, or `null` when no build fits.","properties":{"appId":{"description":"The factory the work item belongs to.","type":"string"},"branch":{"oneOf":[{"description":"The branch the build works on in the primary repository: the head branch of the item's one open pull request there, or `outerlayer/\u003cfactory>/\u003citem number>` when it has none. `null` only for a lease recorded before claims named a branch.","type":"string"},{"description":"The branch the build works on in the primary repository: the head branch of the item's one open pull request there, or `outerlayer/\u003cfactory>/\u003citem number>` when it has none. `null` only for a lease recorded before claims named a branch.","type":"null"}]},"coAuthor":{"description":"The member who asked for the build, for the `Co-authored-by` line the runner adds to each commit. The address is `\u003cgithub-user-id>+\u003clogin>@users.noreply.github.com`, from the GitHub account the member signed in with. Absent when the build has no requester who is a member of the org, when the requester signed in without GitHub, and when `commitAuthor` is absent.","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["name","email"],"type":"object"},"commitAuthor":{"description":"The identity every commit the build makes is authored and committed under: the GitHub App's bot account, named `\u003cslug>[bot]`, with the address `\u003cbot-user-id>+\u003cslug>[bot]@users.noreply.github.com`. Absent on a gateway that holds no GitHub App keys.","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["name","email"],"type":"object"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"host":{"type":"string"},"id":{"type":"string"},"itemKey":{"description":"A signed key, prefixed `olitem_`, that acts only on this work item and only while this lease is live. The runner gives it to the build as its API key. A claim by the lease's own holder returns the same key.","type":"string"},"kind":{"enum":["implement","amend"],"type":"string"},"repositories":{"description":"Every repository the build checks out, the primary first and the others in name order. A factory with one connected repository names one. Each repository has the head branch of the item's one open pull request there, or `outerlayer/\u003cfactory>/\u003citem number>` when it has none. Empty when the item names no repository and the factory has connected none.","items":{"properties":{"branch":{"description":"The branch the build works on in this repository.","type":"string"},"primary":{"description":"`true` for the one repository the item itself lives in or, failing that, the first the claim chose.","type":"boolean"},"repository":{"description":"The repository, as lower-case `owner/repo`.","type":"string"}},"required":["repository","branch","primary"],"type":"object"},"type":"array"},"size":{"description":"The size of the machine the build needs.","enum":["small","large"],"type":"string"},"unreachable":{"description":"Repositories the factory links that this claim leaves out because the GitHub App installation that reaches them is suspended on GitHub. The item's own repository is never listed here: a suspended installation there refuses the claim with `repository_not_reachable`. Always present, as an empty list when nothing was left out.","items":{"properties":{"reason":{"description":"Why the claim leaves the repository out.","enum":["installation_suspended"],"type":"string"},"repository":{"description":"The repository, as lower-case `owner/repo`.","type":"string"}},"required":["repository","reason"],"type":"object"},"type":"array"},"workItemId":{"description":"The id of the work item the lease is on.","type":"string"}},"required":["id","host","kind","createdAt","expiresAt","branch","repositories","itemKey","workItemId","appId","size"],"type":"null","isRequired":true,"uniqueKey":"data.claim.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.claim","typeLabel":"object | null"},"reservation":{"oneOf":[{"description":"The build the gateway holds room for on this machine. The machine takes no build that would leave it without that room.","properties":{"size":{"enum":["small","large"],"type":"string","isRequired":true,"uniqueKey":"data.reservation.oneOf.0.size","typeLabel":"enum\u003cstring>"},"workItemId":{"type":"string","isRequired":true,"uniqueKey":"data.reservation.oneOf.0.workItemId","typeLabel":"string"}},"required":["workItemId","size"],"type":"object","isRequired":true,"uniqueKey":"data.reservation.oneOf.0","typeLabel":"object"},{"description":"The build the gateway holds room for on this machine. The machine takes no build that would leave it without that room.","properties":{"size":{"enum":["small","large"],"type":"string"},"workItemId":{"type":"string"}},"required":["workItemId","size"],"type":"null","isRequired":true,"uniqueKey":"data.reservation.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.reservation","typeLabel":"object | null"},"stops":{"description":"The builds on this machine that a person asked to stop.","items":{"properties":{"claimId":{"type":"string","isRequired":true,"uniqueKey":"data.stops.items.[INDEX].claimId","typeLabel":"string"},"note":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.stops.items.[INDEX].note.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.stops.items.[INDEX].note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.stops.items.[INDEX].note","typeLabel":"string | null"},"requestedByName":{"type":"string","isRequired":true,"uniqueKey":"data.stops.items.[INDEX].requestedByName","typeLabel":"string"}},"required":["claimId","requestedByName","note"],"type":"object","uniqueKey":"data.stops.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"data.stops","typeLabel":"object[]"},"reason":{"description":"Why the build the gateway picked was not claimed, as an error code. Absent when it was.","type":"string","uniqueKey":"data.reason","typeLabel":"string"}},"required":["claim","reservation","stops"],"type":"object","isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["data"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"claim":{"appId":"\u003cstring>","branch":"\u003cstring>","createdAt":"\u003cstring>","expiresAt":"\u003cstring>","host":"\u003cstring>","id":"\u003cstring>","itemKey":"\u003cstring>","kind":"implement","repositories":[{"branch":"\u003cstring>","primary":true,"repository":"\u003cstring>"}],"size":"small","workItemId":"\u003cstring>","coAuthor":{"email":"\u003cstring>","name":"\u003cstring>"},"commitAuthor":{"email":"\u003cstring>","name":"\u003cstring>"},"unreachable":[{"reason":"installation_suspended","repository":"\u003cstring>"}]},"reservation":{"size":"small","workItemId":"\u003cstring>"},"stops":[{"claimId":"\u003cstring>","note":"\u003cstring>","requestedByName":"\u003cstring>"}],"reason":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"The decision. `claim` is `null` when no build fits.","exampleType":"generated"},"28b6aa3f-445b-4c40-a0d0-b167878d3b54":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"The body is malformed.","exampleType":"generated"},"9c20c5e7-3528-41a7-8376-1e98407b1020":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"Missing or invalid API key, or a runner key's signature was refused: `runner_key_signature_required` (the request carries no signature), `runner_key_signature_invalid` (it does not verify against the host key the key is bound to, or the body does not match its digest), `runner_key_signature_stale` (`created` is more than five minutes from the gateway's clock) or `runner_key_signature_replayed` (the nonce was accepted in the last five minutes).","exampleType":"generated"},"6a637cfa-759d-4226-87f6-8c17aabe395d":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"The request comes from an address the machine does not allow (`machine_source_refused`), or the machine was revoked (`machine_revoked`).","exampleType":"generated"},"d242b2f4-e7c1-4829-b2bf-f4f17245a662":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"This gateway does not serve fleet machines.","exampleType":"generated"}},"security":{"aefdafa6-68fc-43d4-a22a-e3835f30342c":{"FleetMachineKey":{"description":"Fleet machine key (olfm_*), made by a platform admin. Belongs to a machine OuterLayer operates, not to a factory.","scheme":"bearer","type":"http","scopes":[],"schemeName":"FleetMachineKey"}}},"servers":{"a95c711b-5d82-4a87-b042-c84fdafe7b0f":{"description":"Production (OuterLayer Cloud)","url":"https://api.outerlayer.ai"},"5826d86e-15e9-4718-90d4-2ee0908f9615":{"description":"Local dev server (self-hosted gateway)","url":"http://localhost:9418"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"description":"Fleet machine key (olfm_*), made by a platform admin. Belongs to a machine OuterLayer operates, not to a factory.","scheme":"bearer","type":"http","scopes":[],"schemeName":"FleetMachineKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Fleet machine key (olfm_*), made by a platform admin. Belongs to a machine OuterLayer operates, not to a factory.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"FleetMachineKey","name":"Authorization"}],"title":"FleetMachineKey"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"outerlayer-stg","siteName":"OuterLayer","title":"Ask for the next managed build - OuterLayer","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T12:18:48.838Z","originalFileLocation":"api-reference/fleet/ask-for-the-next-managed-build.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (olfm_…) as the bearer. Every request is signed by the machine\u0026#x27;s host key, the same profile as a runner key; the first request carries the host key in hostKey and binds the machine to it. A request from an address the machine does not allow is refused with machine_source_refused, and a request from a revoked machine with machine_revoked. The request is also the machine\u0026#x27;s heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization\u0026#x27;s max_managed_builds limit, and only a build that fits the machine\u0026#x27;s room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OuterLayer\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Ask for the next managed build - OuterLayer\">\u003cmeta data-mint-head property=\"og:description\" content=\"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (olfm_…) as the bearer. Every request is signed by the machine\u0026#x27;s host key, the same profile as a runner key; the first request carries the host key in hostKey and binds the machine to it. A request from an address the machine does not allow is refused with machine_source_refused, and a request from a revoked machine with machine_revoked. The request is also the machine\u0026#x27;s heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization\u0026#x27;s max_managed_builds limit, and only a build that fits the machine\u0026#x27;s room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OuterLayer\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://outerlayer-stg.mintlify.app/_mintlify/api/og/v2?division=Fleet\u0026amp;title=Ask+for+the+next+managed+build\u0026amp;description=The+route+a+fleet+machine+asks+for+its+next+managed+build+on.+A+fleet+machine+is+a+machine+OuterLayer+operates%3B+it+belongs+to+no+factory+and+authenticates+with+\u0026amp;theme=e9829cd6b2b3caa26c4296ba\u0026amp;signature=b27b14c4f8f32fdbd559b16b60209e1237c92973e03176c519aa13fe76be34f2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Ask for the next managed build - OuterLayer\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (olfm_…) as the bearer. Every request is signed by the machine\u0026#x27;s host key, the same profile as a runner key; the first request carries the host key in hostKey and binds the machine to it. A request from an address the machine does not allow is refused with machine_source_refused, and a request from a revoked machine with machine_revoked. The request is also the machine\u0026#x27;s heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization\u0026#x27;s max_managed_builds limit, and only a build that fits the machine\u0026#x27;s room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://outerlayer-stg.mintlify.app/_mintlify/api/og/v2?division=Fleet\u0026amp;title=Ask+for+the+next+managed+build\u0026amp;description=The+route+a+fleet+machine+asks+for+its+next+managed+build+on.+A+fleet+machine+is+a+machine+OuterLayer+operates%3B+it+belongs+to+no+factory+and+authenticates+with+\u0026amp;theme=e9829cd6b2b3caa26c4296ba\u0026amp;signature=b27b14c4f8f32fdbd559b16b60209e1237c92973e03176c519aa13fe76be34f2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/outerlayer-stg/FkFLtaVKBgCUe_rr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OuterLayer\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2065D1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/fleet/ask-for-the-next-managed-build.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs-stg.outerlayer.ai/#organization\",\"name\":\"OuterLayer\",\"url\":\"https://docs-stg.outerlayer.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/outerlayer-stg/h46SL2WH_1X-gmFL/logo/light.svg?fit=max\u0026auto=format\u0026n=h46SL2WH_1X-gmFL\u0026q=85\u0026s=de563af4ba1bc24d13a1c4a7485a2182\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs-stg.outerlayer.ai#website\",\"name\":\"OuterLayer\",\"url\":\"https://docs-stg.outerlayer.ai\",\"publisher\":{\"@id\":\"https://docs-stg.outerlayer.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build#webpage\",\"url\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build\",\"name\":\"Ask for the next managed build\",\"description\":\"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (olfm_…) as the bearer. Every request is signed by the machine's host key, the same profile as a runner key; the first request carries the host key in hostKey and binds the machine to it. A request from an address the machine does not allow is refused with machine_source_refused, and a request from a revoked machine with machine_revoked. The request is also the machine's heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization's max_managed_builds limit, and only a build that fits the machine's room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.\",\"dateModified\":\"2026-10-27T12:18:48.838Z\",\"isPartOf\":{\"@id\":\"https://docs-stg.outerlayer.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs-stg.outerlayer.ai/api-reference/oauth/oauth-protected-resource-metadata\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ask for the next managed build\",\"item\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build#apireference\",\"headline\":\"Ask for the next managed build\",\"name\":\"Ask for the next managed build\",\"description\":\"The route a fleet machine asks for its next managed build on. A fleet machine is a machine OuterLayer operates; it belongs to no factory and authenticates with a fleet machine key (olfm_…) as the bearer. Every request is signed by the machine's host key, the same profile as a runner key; the first request carries the host key in hostKey and binds the machine to it. A request from an address the machine does not allow is refused with machine_source_refused, and a request from a revoked machine with machine_revoked. The request is also the machine's heartbeat. The gateway picks at most one build of any organization that has managed builds on, the organization that runs the fewest fleet builds first and the oldest build first, within each organization's max_managed_builds limit, and only a build that fits the machine's room. The answer carries the claim for that build, a reservation when the gateway holds room on this machine for a larger build, and the stops people asked for. Served by the Worker gateway only; a Node gateway answers 404.\",\"url\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build\",\"mainEntityOfPage\":{\"@id\":\"https://docs-stg.outerlayer.ai/api-reference/fleet/ask-for-the-next-managed-build#webpage\"},\"dateModified\":\"2026-10-27T12:18:48.838Z\",\"publisher\":{\"@id\":\"https://docs-stg.outerlayer.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs-stg.outerlayer.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OuterLayer\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"OuterLayer","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"CLI reference","pages":[{"title":"CLI reference","href":"/reference/cli"}]},{"tab":"API reference","groups":[{"group":"Get started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Organization API","href":"/organization-api"}]},{"group":"Endpoints","pages":[{"group":"OAuth","pages":[{"title":"OAuth protected-resource metadata","deprecated":null,"version":null,"openapi":"/openapi.yaml get /.well-known/oauth-protected-resource","href":"/api-reference/oauth/oauth-protected-resource-metadata"},{"title":"OAuth protected-resource metadata for the per-app MCP mount","deprecated":null,"version":null,"openapi":"/openapi.yaml get /.well-known/oauth-protected-resource/v1/apps/{appId}/mcp","href":"/api-reference/oauth/oauth-protected-resource-metadata-for-the-per-app-mcp-mount"}]},{"group":"Health","pages":[{"title":"Service health","deprecated":null,"version":null,"openapi":"/openapi.yaml get /health","href":"/api-reference/health/service-health"},{"title":"Files health","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/health/files","href":"/api-reference/health/files-health"},{"title":"Ingestion health","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/health/ingestion","href":"/api-reference/health/ingestion-health"}]},{"group":"Agents","pages":[{"title":"Fetch an agent session image blob via a signed token","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agents/blob-token/{token}","href":"/api-reference/agents/fetch-an-agent-session-image-blob-via-a-signed-token"},{"title":"Fetch an agent session image blob","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agents/blob/{sha256}","href":"/api-reference/agents/fetch-an-agent-session-image-blob"},{"title":"Ingest coding-agent sessions (outerlayer sync)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agents/sync","href":"/api-reference/agents/ingest-coding-agent-sessions-outerlayer-sync"}]},{"group":"API Keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/api-keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create API key","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/api-keys","href":"/api-reference/api-keys/create-api-key"},{"title":"Revoke API key","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/api-keys/{apiKeyId}","href":"/api-reference/api-keys/revoke-api-key"},{"title":"Change API key permissions","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/api-keys/{apiKeyId}","href":"/api-reference/api-keys/change-api-key-permissions"},{"title":"Clear a runner key's host binding","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/api-keys/{apiKeyId}/host-key","href":"/api-reference/api-keys/clear-a-runner-keys-host-binding"}]},{"group":"Apps","pages":[{"title":"List apps","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps","href":"/api-reference/apps/list-apps"},{"title":"Create app","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/apps","href":"/api-reference/apps/create-app"},{"title":"Get app","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps/{appId}","href":"/api-reference/apps/get-app"},{"title":"Delete app","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/apps/{appId}","href":"/api-reference/apps/delete-app"},{"title":"Update app","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/apps/{appId}","href":"/api-reference/apps/update-app"},{"title":"Get whether the factory has stored an Anthropic API key","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps/{appId}/anthropic-key","href":"/api-reference/apps/get-whether-the-factory-has-stored-an-anthropic-api-key"},{"title":"Store or replace the factory's Anthropic API key","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/apps/{appId}/anthropic-key","href":"/api-reference/apps/store-or-replace-the-factorys-anthropic-api-key"},{"title":"Remove the factory's Anthropic API key","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/apps/{appId}/anthropic-key","href":"/api-reference/apps/remove-the-factorys-anthropic-api-key"},{"title":"Save or replace a build variable of the factory","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/apps/{appId}/build-variables/{name}","href":"/api-reference/apps/save-or-replace-a-build-variable-of-the-factory"},{"title":"Remove a build variable of the factory","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/apps/{appId}/build-variables/{name}","href":"/api-reference/apps/remove-a-build-variable-of-the-factory"},{"title":"Get git connection status for an app","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps/{appId}/git","href":"/api-reference/apps/get-git-connection-status-for-an-app"},{"title":"List branches in a repository","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps/{appId}/git/branches","href":"/api-reference/apps/list-branches-in-a-repository"},{"title":"Mint an OAuth authorization URL for git-provider connect","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/apps/{appId}/git/connect","href":"/api-reference/apps/mint-an-oauth-authorization-url-for-git-provider-connect"},{"title":"Link a repository and branch to an app","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/apps/{appId}/git/link","href":"/api-reference/apps/link-a-repository-and-branch-to-an-app"},{"title":"Clear the linked repository and branch","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/apps/{appId}/git/link","href":"/api-reference/apps/clear-the-linked-repository-and-branch"},{"title":"List every repository linked to the factory, with its branches","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps/{appId}/git/links","href":"/api-reference/apps/list-every-repository-linked-to-the-factory-with-its-branches"},{"title":"List repositories accessible to the app's git installations","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps/{appId}/git/repositories","href":"/api-reference/apps/list-repositories-accessible-to-the-apps-git-installations"},{"title":"Remove a GitHub organization from the factory","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/apps/{appId}/installations/{installationId}","href":"/api-reference/apps/remove-a-github-organization-from-the-factory"},{"title":"Get the factory's managed build settings","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/apps/{appId}/managed-build-settings","href":"/api-reference/apps/get-the-factorys-managed-build-settings"},{"title":"Change the factory's managed build settings","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/apps/{appId}/managed-build-settings","href":"/api-reference/apps/change-the-factorys-managed-build-settings"}]},{"group":"Artifacts","pages":[{"title":"Emit an artifact (evidence for a pull request)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/artifacts","href":"/api-reference/artifacts/emit-an-artifact-evidence-for-a-pull-request"}]},{"group":"Capabilities","pages":[{"title":"Get capabilities","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/capabilities","href":"/api-reference/capabilities/get-capabilities"}]},{"group":"Context","pages":[{"title":"List context changes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/context/changes","href":"/api-reference/context/list-context-changes"},{"title":"Get the context a build receives","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/context/delivery","href":"/api-reference/context/get-the-context-a-build-receives"},{"title":"Get control plane","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/context/source","href":"/api-reference/context/get-control-plane"},{"title":"Read a factory's control plane","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orgs/{orgName}/apps/{appId}/context-source","href":"/api-reference/context/read-a-factorys-control-plane"},{"title":"Designate a factory's control plane","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/orgs/{orgName}/apps/{appId}/context-source","href":"/api-reference/context/designate-a-factorys-control-plane"},{"title":"Revoke a factory's control plane","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/orgs/{orgName}/apps/{appId}/context-source","href":"/api-reference/context/revoke-a-factorys-control-plane"}]},{"group":"Criteria","pages":[{"title":"Record a work item's acceptance criteria","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/criteria","href":"/api-reference/criteria/record-a-work-items-acceptance-criteria"}]},{"group":"Emitted Results","pages":[{"title":"Emit a check result (pass/fail evidence for a work item)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/emitted-results","href":"/api-reference/emitted-results/emit-a-check-result-passfail-evidence-for-a-work-item"},{"title":"Change a check's status","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/emitted-results/{emittedResultId}/status","href":"/api-reference/emitted-results/change-a-checks-status"}]},{"group":"Findings","pages":[{"title":"Record a batch of findings on a work item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/findings","href":"/api-reference/findings/record-a-batch-of-findings-on-a-work-item"},{"title":"Findings and time lost per category","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/findings/summary","href":"/api-reference/findings/findings-and-time-lost-per-category"},{"title":"Rank a factory's problems","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/problems","href":"/api-reference/findings/rank-a-factorys-problems"},{"title":"One problem with its findings","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/problems/{problemId}","href":"/api-reference/findings/one-problem-with-its-findings"},{"title":"A work item's findings","description":"One work item's findings, newest recorded first and at most the newest 500 (`pagination.truncated` is true when there are more), each with the problems it reports. `workItemId` is the item's id or its number in this factory. A key scoped to one work item can read that item's findings and no other's.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/findings","href":"/api-reference/findings/a-work-items-findings"}]},{"group":"Fleet","pages":[{"title":"Ask for the next managed build","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/fleet/next","href":"/api-reference/fleet/ask-for-the-next-managed-build"}]},{"group":"Hosts","pages":[{"title":"List the factory's runner hosts","description":"Every host that has sent at least one heartbeat, ordered by host name. Each carries the CLI version, the runner protocol and slots it last reported, its last heartbeat time, its last successful request for work, its last error, its last self-update (the versions it moved between, how it ended, and why when it did not succeed; null until it reports one), its low-disk state (`lowDisk`: the free bytes and the bytes it needs, set while the host holds off new work for want of disk and null otherwise), whether it is taking work (`blocked`: the reason, set while the host claims nothing because it cannot run the work it would be given, and null otherwise), what it said it is doing (`state`: taking-work, draining, restarting, holding-for-update, blocked or low-disk; null for a runner older than protocol 21), the items a draining host waits on (`waitingItems`), what it takes (`takes`: the queues and the repository include and exclude patterns; null for a runner older than protocol 21, which counts as taking everything), whether it updates itself (`selfUpdate`: `yes`, `no` with a reason, or `unknown` for a heartbeat that carries no field), where it stands against the support window (`support`: its state, the lowest version that may claim, the version the gateway names to it, and the date a behind runner is refused), and a status derived at read time — never stored — from those timestamps: `stale` when the last heartbeat is older than three times the host's own `pollSeconds`; otherwise `draining` when the last heartbeat said it is draining; otherwise `outdated` when the last heartbeat carried a runner protocol below the gateway's minimum, or the runner's version is below the lowest version that may claim; otherwise `failing` when the last request for work failed and no later success cleared it; otherwise `ok`. Unpaginated.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/hosts","href":"/api-reference/hosts/list-the-factorys-runner-hosts"},{"title":"Report a heartbeat from a runner host","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/hosts/heartbeat","href":"/api-reference/hosts/report-a-heartbeat-from-a-runner-host"},{"title":"Report a runner start that failed a check","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/hosts/startup-report","href":"/api-reference/hosts/report-a-runner-start-that-failed-a-check"}]},{"group":"Account","pages":[{"title":"List the factories the login token can use","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/me/factories","href":"/api-reference/account/list-the-factories-the-login-token-can-use"}]},{"group":"Metrics","pages":[{"title":"Get a cost/session/error breakdown by dimension","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/metrics/breakdown","href":"/api-reference/metrics/get-a-costsessionerror-breakdown-by-dimension"},{"title":"Compare metrics across two windows","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/metrics/compare","href":"/api-reference/metrics/compare-metrics-across-two-windows"},{"title":"Get per-model stats","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/metrics/models","href":"/api-reference/metrics/get-per-model-stats"},{"title":"Get fleet overview","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/metrics/overview","href":"/api-reference/metrics/get-fleet-overview"},{"title":"Get the daily sessions/cost/quality trend","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/metrics/trends","href":"/api-reference/metrics/get-the-daily-sessionscostquality-trend"}]},{"group":"Org Management","pages":[{"title":"List an org's audit log","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orgs/{orgName}/audit-log","href":"/api-reference/org-management/list-an-orgs-audit-log"},{"title":"Export an org's audit log as CSV","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orgs/{orgName}/audit-log/export","href":"/api-reference/org-management/export-an-orgs-audit-log-as-csv"},{"title":"Get one audit log entry","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orgs/{orgName}/audit-log/{logId}","href":"/api-reference/org-management/get-one-audit-log-entry"},{"title":"List org members and pending invites","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orgs/{orgName}/members","href":"/api-reference/org-management/list-org-members-and-pending-invites"},{"title":"Invite an org member","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orgs/{orgName}/members/invites","href":"/api-reference/org-management/invite-an-org-member"},{"title":"Resend a pending invite","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orgs/{orgName}/members/invites/{inviteId}/resend","href":"/api-reference/org-management/resend-a-pending-invite"},{"title":"Remove a member from the org","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/orgs/{orgName}/members/{userId}","href":"/api-reference/org-management/remove-a-member-from-the-org"},{"title":"Change a member's role","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/orgs/{orgName}/members/{userId}","href":"/api-reference/org-management/change-a-members-role"},{"title":"List built-in org roles","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orgs/{orgName}/roles","href":"/api-reference/org-management/list-built-in-org-roles"}]},{"group":"Pricing","pages":[{"title":"Get LLM pricing","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/pricing","href":"/api-reference/pricing/get-llm-pricing"}]},{"group":"PRs","pages":[{"title":"Get session→PR attribution merged with cost","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/prs/outcomes","href":"/api-reference/prs/get-session→pr-attribution-merged-with-cost"}]},{"group":"Repositories","pages":[{"title":"Report the GitHub App access builds need on each of the factory's repositories","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/repositories/access","href":"/api-reference/repositories/report-the-github-app-access-builds-need-on-each-of-the-factorys-repositories"}]},{"group":"Runner version","pages":[{"title":"Set the CLI version this gateway names to its runners","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/runner-version","href":"/api-reference/runner-version/set-the-cli-version-this-gateway-names-to-its-runners"}]},{"group":"Work Items","pages":[{"title":"Read a runner key's host binding","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/runner/host-key","href":"/api-reference/work-items/read-a-runner-keys-host-binding"},{"title":"List live work items","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items","href":"/api-reference/work-items/list-live-work-items"},{"title":"Add an issue to Work","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items","href":"/api-reference/work-items/add-an-issue-to-work"},{"title":"Request a host build an item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/build","href":"/api-reference/work-items/request-a-host-build-an-item"},{"title":"Declare a session's pull request onto its work item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/pull-requests","href":"/api-reference/work-items/declare-a-sessions-pull-request-onto-its-work-item"},{"title":"Report that a step has started on a work item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/steps","href":"/api-reference/work-items/report-that-a-step-has-started-on-a-work-item"},{"title":"Link a session to a work item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{number}/sessions","href":"/api-reference/work-items/link-a-session-to-a-work-item"},{"title":"Read one work item","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}","href":"/api-reference/work-items/read-one-work-item"},{"title":"List a work item's artifacts","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/artifacts","href":"/api-reference/work-items/list-a-work-items-artifacts"},{"title":"List checks recorded on a work item since a point","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/changes","href":"/api-reference/work-items/list-checks-recorded-on-a-work-item-since-a-point"},{"title":"List the checks currently open on a work item","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/checks","href":"/api-reference/work-items/list-the-checks-currently-open-on-a-work-item"},{"title":"Claim a work item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/claim","href":"/api-reference/work-items/claim-a-work-item"},{"title":"Get the factory's Anthropic API key for a claim a managed runner holds","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/claim/anthropic-key","href":"/api-reference/work-items/get-the-factorys-anthropic-api-key-for-a-claim-a-managed-runner-holds"},{"title":"Get the factory's managed build settings for a claim a managed runner holds","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/claim/build-settings","href":"/api-reference/work-items/get-the-factorys-managed-build-settings-for-a-claim-a-managed-runner-holds"},{"title":"Release a host's claim on a work item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/claim/release","href":"/api-reference/work-items/release-a-hosts-claim-on-a-work-item"},{"title":"Renew a host's claim on a work item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/claim/renew","href":"/api-reference/work-items/renew-a-hosts-claim-on-a-work-item"},{"title":"Stop a work item's host build","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/claim/stop","href":"/api-reference/work-items/stop-a-work-items-host-build"},{"title":"Issue a GitHub token for a work item's repository or its control plane","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/claim/tokens","href":"/api-reference/work-items/issue-a-github-token-for-a-work-items-repository-or-its-control-plane"},{"title":"Read a host attempt's runner log","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/claims/{claimId}/log","href":"/api-reference/work-items/read-a-host-attempts-runner-log"},{"title":"Post a comment on a work item's general thread or a criterion thread","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/comments","href":"/api-reference/work-items/post-a-comment-on-a-work-items-general-thread-or-a-criterion-thread"},{"title":"Get a work item's newest demo","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/demo","href":"/api-reference/work-items/get-a-work-items-newest-demo"},{"title":"Send review notes on several criteria as one agent job","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/notes","href":"/api-reference/work-items/send-review-notes-on-several-criteria-as-one-agent-job"},{"title":"The problems a work item covers","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/problems","href":"/api-reference/work-items/the-problems-a-work-item-covers"},{"title":"Record the result of a fix for one covered problem","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/work-items/{workItemId}/problems/{problemId}/result","href":"/api-reference/work-items/record-the-result-of-a-fix-for-one-covered-problem"},{"title":"Open or edit a work item's pull request","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/work-items/{workItemId}/pull-request","href":"/api-reference/work-items/open-or-edit-a-work-items-pull-request"},{"title":"Withdraw a work item's declaration of a pull request","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/work-items/{workItemId}/pull-requests/{repository}/{prNumber}","href":"/api-reference/work-items/withdraw-a-work-items-declaration-of-a-pull-request"},{"title":"Remove an addition from Work","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/work-items/{workItemId}/remove","href":"/api-reference/work-items/remove-an-addition-from-work"},{"title":"A work item's general thread and its criterion threads","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/work-items/{workItemId}/threads","href":"/api-reference/work-items/a-work-items-general-thread-and-its-criterion-threads"}]},{"group":"Sessions","pages":[{"title":"List agent sessions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions","href":"/api-reference/sessions/list-agent-sessions"},{"title":"Get agent session detail","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sessions/{traceId}","href":"/api-reference/sessions/get-agent-session-detail"}]},{"group":"Specs","pages":[{"title":"File a spec as an issue","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/specs","href":"/api-reference/specs/file-a-spec-as-an-issue"},{"title":"Search issues a spec might duplicate","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/specs/search","href":"/api-reference/specs/search-issues-a-spec-might-duplicate"},{"title":"Where a spec would be filed","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/specs/target","href":"/api-reference/specs/where-a-spec-would-be-filed"},{"title":"Replace a spec's body","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/specs/{key}","href":"/api-reference/specs/replace-a-specs-body"}]}]}]}]},"title":"Ask for the next managed build - OuterLayer","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-rfhihCWU.js","utils-BmH1XFxk.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BcNsxPKB.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BAES3tkd.js","snippetPresets-DCMQBKLP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D6l_bzE9.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BOktbnNh.js","shallow-BCs8SgM7.js","getApiPlaygroundDisplay-DEmW5bJB.js","CodeSnippet-CpZOpB9C.js","CodeSnippets-BOBDqibl.js","Page-D5fEM6aW.js","getPastedJson-DH2JBvmr.js","icon-BBJH-kKh.js","MethodPill-D2Sd5NLC.js","DuplicateIcon-CGgfL2qN.js","createIcon-BKudBBzi.js","DynamicMarkdown-85clUA0i.js","SectionHeading-D0JiMgDx.js","axios-vUo_bRtp.js","Markdown-Cfiy0xZO.js","clsx-rL8ZCCw4.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-aeztFa9U.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BywkCr5C.js"]}