archastro.platform.v1.resources.agent_computers

  1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
  2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
  3# Content hash: 7e3892808525
  4
  5from __future__ import annotations
  6
  7from typing import Required, TypedDict
  8
  9from ...runtime.http_client import HttpClient, SyncHttpClient
 10from ...types.common import AgentComputer, ComputerExecResult
 11
 12
 13class AgentComputerExecInput(TypedDict, total=False):
 14    "Execute a command on a computer"
 15
 16    command: Required[str]
 17    'Shell command to execute, e.g. `"ls -la /home"`.'
 18    dir: str | None
 19    "Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted."
 20
 21
 22class AsyncAgentComputerResource:
 23    def __init__(self, http: HttpClient):
 24        self._http = http
 25
 26    async def delete(self, computer: str) -> None:
 27        """
 28        Delete a computer
 29        Permanently deletes the specified computer and releases all associated
 30        infrastructure resources. This action is irreversible once deleted,
 31        the computer cannot be recovered and its ID becomes invalid.
 32        Requires an app-scoped API key. The computer must belong to the same app.
 33        Returns `204 No Content` on success.
 34
 35        Args:
 36            computer: Computer ID (`cmp_...`). The computer to delete.
 37
 38        Returns:
 39            Empty response body. Returns HTTP 204 on success.
 40        """
 41        await self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE")
 42
 43    async def get(self, computer: str) -> AgentComputer:
 44        """
 45        Retrieve a computer
 46        Returns the computer identified by `computer`. The computer must belong to the
 47        app associated with the API key.
 48        Use this endpoint to inspect a computer's current `status`, `region`,
 49        `config`, and `metadata` after provisioning or to verify its state before
 50        issuing commands. For a live status update, use the refresh endpoint instead.
 51
 52        Args:
 53            computer: Computer ID (`cmp_...`). The computer to retrieve.
 54
 55        Returns:
 56            The requested computer.
 57        """
 58        return await self._http.request(
 59            f"/api/v1/agent_computers/{computer}",
 60            response_type=AgentComputer,
 61        )
 62
 63    async def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult:
 64        """
 65        Execute a command on a computer
 66        Runs a shell command on the specified computer and returns its combined
 67        output and exit code. The call blocks until the command completes; there
 68        is no streaming or timeout override plan accordingly for long-running
 69        commands.
 70        Requires an app-scoped API key. The computer must be in the `running`
 71        state. Commands run as the default unprivileged user on the computer.
 72        A non-zero `exit_code` in the response does not produce an HTTP error;
 73        inspect `exit_code` and `output` to determine success.
 74
 75        Args:
 76            computer: Computer ID (`cmp_...`). The computer on which to run the command.
 77            input: Request body.
 78            input.command: Shell command to execute, e.g. `"ls -la /home"`.
 79            input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
 80
 81        Returns:
 82            The output and exit code produced by the command.
 83        """
 84        return await self._http.request(
 85            f"/api/v1/agent_computers/{computer}/exec",
 86            method="POST",
 87            body=input,
 88            response_type=ComputerExecResult,
 89        )
 90
 91    async def refresh(self, computer: str) -> AgentComputer:
 92        """
 93        Refresh a computer's status
 94        Fetches the latest status for the specified computer from the upstream
 95        provisioning provider and updates the platform record accordingly. Use this
 96        endpoint to reconcile a computer whose `status` appears stale or stuck in
 97        a transitional state such as `provisioning`.
 98        Requires an app-scoped API key. Returns 422 if the computer has not been
 99        fully provisioned yet. The updated computer object is returned on success.
100
101        Args:
102            computer: Computer ID (`cmp_...`). The computer whose status should be refreshed.
103
104        Returns:
105            The computer record with its status updated from the provisioning provider.
106        """
107        return await self._http.request(
108            f"/api/v1/agent_computers/{computer}/refresh",
109            method="POST",
110            response_type=AgentComputer,
111        )
112
113
114class AgentComputerResource:
115    def __init__(self, http: SyncHttpClient):
116        self._http = http
117
118    def delete(self, computer: str) -> None:
119        """
120        Delete a computer
121        Permanently deletes the specified computer and releases all associated
122        infrastructure resources. This action is irreversible once deleted,
123        the computer cannot be recovered and its ID becomes invalid.
124        Requires an app-scoped API key. The computer must belong to the same app.
125        Returns `204 No Content` on success.
126
127        Args:
128            computer: Computer ID (`cmp_...`). The computer to delete.
129
130        Returns:
131            Empty response body. Returns HTTP 204 on success.
132        """
133        self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE")
134
135    def get(self, computer: str) -> AgentComputer:
136        """
137        Retrieve a computer
138        Returns the computer identified by `computer`. The computer must belong to the
139        app associated with the API key.
140        Use this endpoint to inspect a computer's current `status`, `region`,
141        `config`, and `metadata` after provisioning or to verify its state before
142        issuing commands. For a live status update, use the refresh endpoint instead.
143
144        Args:
145            computer: Computer ID (`cmp_...`). The computer to retrieve.
146
147        Returns:
148            The requested computer.
149        """
150        return self._http.request(
151            f"/api/v1/agent_computers/{computer}",
152            response_type=AgentComputer,
153        )
154
155    def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult:
156        """
157        Execute a command on a computer
158        Runs a shell command on the specified computer and returns its combined
159        output and exit code. The call blocks until the command completes; there
160        is no streaming or timeout override plan accordingly for long-running
161        commands.
162        Requires an app-scoped API key. The computer must be in the `running`
163        state. Commands run as the default unprivileged user on the computer.
164        A non-zero `exit_code` in the response does not produce an HTTP error;
165        inspect `exit_code` and `output` to determine success.
166
167        Args:
168            computer: Computer ID (`cmp_...`). The computer on which to run the command.
169            input: Request body.
170            input.command: Shell command to execute, e.g. `"ls -la /home"`.
171            input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
172
173        Returns:
174            The output and exit code produced by the command.
175        """
176        return self._http.request(
177            f"/api/v1/agent_computers/{computer}/exec",
178            method="POST",
179            body=input,
180            response_type=ComputerExecResult,
181        )
182
183    def refresh(self, computer: str) -> AgentComputer:
184        """
185        Refresh a computer's status
186        Fetches the latest status for the specified computer from the upstream
187        provisioning provider and updates the platform record accordingly. Use this
188        endpoint to reconcile a computer whose `status` appears stale or stuck in
189        a transitional state such as `provisioning`.
190        Requires an app-scoped API key. Returns 422 if the computer has not been
191        fully provisioned yet. The updated computer object is returned on success.
192
193        Args:
194            computer: Computer ID (`cmp_...`). The computer whose status should be refreshed.
195
196        Returns:
197            The computer record with its status updated from the provisioning provider.
198        """
199        return self._http.request(
200            f"/api/v1/agent_computers/{computer}/refresh",
201            method="POST",
202            response_type=AgentComputer,
203        )
class AgentComputerExecInput(typing.TypedDict):
14class AgentComputerExecInput(TypedDict, total=False):
15    "Execute a command on a computer"
16
17    command: Required[str]
18    'Shell command to execute, e.g. `"ls -la /home"`.'
19    dir: str | None
20    "Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted."

Execute a command on a computer

command: Required[str]

Shell command to execute, e.g. "ls -la /home".

dir: str | None

Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.

class AsyncAgentComputerResource:
 23class AsyncAgentComputerResource:
 24    def __init__(self, http: HttpClient):
 25        self._http = http
 26
 27    async def delete(self, computer: str) -> None:
 28        """
 29        Delete a computer
 30        Permanently deletes the specified computer and releases all associated
 31        infrastructure resources. This action is irreversible once deleted,
 32        the computer cannot be recovered and its ID becomes invalid.
 33        Requires an app-scoped API key. The computer must belong to the same app.
 34        Returns `204 No Content` on success.
 35
 36        Args:
 37            computer: Computer ID (`cmp_...`). The computer to delete.
 38
 39        Returns:
 40            Empty response body. Returns HTTP 204 on success.
 41        """
 42        await self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE")
 43
 44    async def get(self, computer: str) -> AgentComputer:
 45        """
 46        Retrieve a computer
 47        Returns the computer identified by `computer`. The computer must belong to the
 48        app associated with the API key.
 49        Use this endpoint to inspect a computer's current `status`, `region`,
 50        `config`, and `metadata` after provisioning or to verify its state before
 51        issuing commands. For a live status update, use the refresh endpoint instead.
 52
 53        Args:
 54            computer: Computer ID (`cmp_...`). The computer to retrieve.
 55
 56        Returns:
 57            The requested computer.
 58        """
 59        return await self._http.request(
 60            f"/api/v1/agent_computers/{computer}",
 61            response_type=AgentComputer,
 62        )
 63
 64    async def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult:
 65        """
 66        Execute a command on a computer
 67        Runs a shell command on the specified computer and returns its combined
 68        output and exit code. The call blocks until the command completes; there
 69        is no streaming or timeout override plan accordingly for long-running
 70        commands.
 71        Requires an app-scoped API key. The computer must be in the `running`
 72        state. Commands run as the default unprivileged user on the computer.
 73        A non-zero `exit_code` in the response does not produce an HTTP error;
 74        inspect `exit_code` and `output` to determine success.
 75
 76        Args:
 77            computer: Computer ID (`cmp_...`). The computer on which to run the command.
 78            input: Request body.
 79            input.command: Shell command to execute, e.g. `"ls -la /home"`.
 80            input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
 81
 82        Returns:
 83            The output and exit code produced by the command.
 84        """
 85        return await self._http.request(
 86            f"/api/v1/agent_computers/{computer}/exec",
 87            method="POST",
 88            body=input,
 89            response_type=ComputerExecResult,
 90        )
 91
 92    async def refresh(self, computer: str) -> AgentComputer:
 93        """
 94        Refresh a computer's status
 95        Fetches the latest status for the specified computer from the upstream
 96        provisioning provider and updates the platform record accordingly. Use this
 97        endpoint to reconcile a computer whose `status` appears stale or stuck in
 98        a transitional state such as `provisioning`.
 99        Requires an app-scoped API key. Returns 422 if the computer has not been
100        fully provisioned yet. The updated computer object is returned on success.
101
102        Args:
103            computer: Computer ID (`cmp_...`). The computer whose status should be refreshed.
104
105        Returns:
106            The computer record with its status updated from the provisioning provider.
107        """
108        return await self._http.request(
109            f"/api/v1/agent_computers/{computer}/refresh",
110            method="POST",
111            response_type=AgentComputer,
112        )
AsyncAgentComputerResource(http: archastro.platform.runtime.http_client.HttpClient)
24    def __init__(self, http: HttpClient):
25        self._http = http
async def delete(self, computer: str) -> None:
27    async def delete(self, computer: str) -> None:
28        """
29        Delete a computer
30        Permanently deletes the specified computer and releases all associated
31        infrastructure resources. This action is irreversible once deleted,
32        the computer cannot be recovered and its ID becomes invalid.
33        Requires an app-scoped API key. The computer must belong to the same app.
34        Returns `204 No Content` on success.
35
36        Args:
37            computer: Computer ID (`cmp_...`). The computer to delete.
38
39        Returns:
40            Empty response body. Returns HTTP 204 on success.
41        """
42        await self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE")

Delete a computer Permanently deletes the specified computer and releases all associated infrastructure resources. This action is irreversible once deleted, the computer cannot be recovered and its ID becomes invalid. Requires an app-scoped API key. The computer must belong to the same app. Returns 204 No Content on success.

Arguments:
  • computer: Computer ID (cmp_...). The computer to delete.
Returns:

Empty response body. Returns HTTP 204 on success.

async def get(self, computer: str) -> archastro.platform.types.common.AgentComputer:
44    async def get(self, computer: str) -> AgentComputer:
45        """
46        Retrieve a computer
47        Returns the computer identified by `computer`. The computer must belong to the
48        app associated with the API key.
49        Use this endpoint to inspect a computer's current `status`, `region`,
50        `config`, and `metadata` after provisioning or to verify its state before
51        issuing commands. For a live status update, use the refresh endpoint instead.
52
53        Args:
54            computer: Computer ID (`cmp_...`). The computer to retrieve.
55
56        Returns:
57            The requested computer.
58        """
59        return await self._http.request(
60            f"/api/v1/agent_computers/{computer}",
61            response_type=AgentComputer,
62        )

Retrieve a computer Returns the computer identified by computer. The computer must belong to the app associated with the API key. Use this endpoint to inspect a computer's current status, region, config, and metadata after provisioning or to verify its state before issuing commands. For a live status update, use the refresh endpoint instead.

Arguments:
  • computer: Computer ID (cmp_...). The computer to retrieve.
Returns:

The requested computer.

async def exec( self, computer: str, input: AgentComputerExecInput) -> archastro.platform.types.common.ComputerExecResult:
64    async def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult:
65        """
66        Execute a command on a computer
67        Runs a shell command on the specified computer and returns its combined
68        output and exit code. The call blocks until the command completes; there
69        is no streaming or timeout override plan accordingly for long-running
70        commands.
71        Requires an app-scoped API key. The computer must be in the `running`
72        state. Commands run as the default unprivileged user on the computer.
73        A non-zero `exit_code` in the response does not produce an HTTP error;
74        inspect `exit_code` and `output` to determine success.
75
76        Args:
77            computer: Computer ID (`cmp_...`). The computer on which to run the command.
78            input: Request body.
79            input.command: Shell command to execute, e.g. `"ls -la /home"`.
80            input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
81
82        Returns:
83            The output and exit code produced by the command.
84        """
85        return await self._http.request(
86            f"/api/v1/agent_computers/{computer}/exec",
87            method="POST",
88            body=input,
89            response_type=ComputerExecResult,
90        )

Execute a command on a computer Runs a shell command on the specified computer and returns its combined output and exit code. The call blocks until the command completes; there is no streaming or timeout override plan accordingly for long-running commands. Requires an app-scoped API key. The computer must be in the running state. Commands run as the default unprivileged user on the computer. A non-zero exit_code in the response does not produce an HTTP error; inspect exit_code and output to determine success.

Arguments:
  • computer: Computer ID (cmp_...). The computer on which to run the command.
  • input: Request body.
  • input.command: Shell command to execute, e.g. "ls -la /home".
  • input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
Returns:

The output and exit code produced by the command.

async def refresh(self, computer: str) -> archastro.platform.types.common.AgentComputer:
 92    async def refresh(self, computer: str) -> AgentComputer:
 93        """
 94        Refresh a computer's status
 95        Fetches the latest status for the specified computer from the upstream
 96        provisioning provider and updates the platform record accordingly. Use this
 97        endpoint to reconcile a computer whose `status` appears stale or stuck in
 98        a transitional state such as `provisioning`.
 99        Requires an app-scoped API key. Returns 422 if the computer has not been
100        fully provisioned yet. The updated computer object is returned on success.
101
102        Args:
103            computer: Computer ID (`cmp_...`). The computer whose status should be refreshed.
104
105        Returns:
106            The computer record with its status updated from the provisioning provider.
107        """
108        return await self._http.request(
109            f"/api/v1/agent_computers/{computer}/refresh",
110            method="POST",
111            response_type=AgentComputer,
112        )

Refresh a computer's status Fetches the latest status for the specified computer from the upstream provisioning provider and updates the platform record accordingly. Use this endpoint to reconcile a computer whose status appears stale or stuck in a transitional state such as provisioning. Requires an app-scoped API key. Returns 422 if the computer has not been fully provisioned yet. The updated computer object is returned on success.

Arguments:
  • computer: Computer ID (cmp_...). The computer whose status should be refreshed.
Returns:

The computer record with its status updated from the provisioning provider.

class AgentComputerResource:
115class AgentComputerResource:
116    def __init__(self, http: SyncHttpClient):
117        self._http = http
118
119    def delete(self, computer: str) -> None:
120        """
121        Delete a computer
122        Permanently deletes the specified computer and releases all associated
123        infrastructure resources. This action is irreversible once deleted,
124        the computer cannot be recovered and its ID becomes invalid.
125        Requires an app-scoped API key. The computer must belong to the same app.
126        Returns `204 No Content` on success.
127
128        Args:
129            computer: Computer ID (`cmp_...`). The computer to delete.
130
131        Returns:
132            Empty response body. Returns HTTP 204 on success.
133        """
134        self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE")
135
136    def get(self, computer: str) -> AgentComputer:
137        """
138        Retrieve a computer
139        Returns the computer identified by `computer`. The computer must belong to the
140        app associated with the API key.
141        Use this endpoint to inspect a computer's current `status`, `region`,
142        `config`, and `metadata` after provisioning or to verify its state before
143        issuing commands. For a live status update, use the refresh endpoint instead.
144
145        Args:
146            computer: Computer ID (`cmp_...`). The computer to retrieve.
147
148        Returns:
149            The requested computer.
150        """
151        return self._http.request(
152            f"/api/v1/agent_computers/{computer}",
153            response_type=AgentComputer,
154        )
155
156    def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult:
157        """
158        Execute a command on a computer
159        Runs a shell command on the specified computer and returns its combined
160        output and exit code. The call blocks until the command completes; there
161        is no streaming or timeout override plan accordingly for long-running
162        commands.
163        Requires an app-scoped API key. The computer must be in the `running`
164        state. Commands run as the default unprivileged user on the computer.
165        A non-zero `exit_code` in the response does not produce an HTTP error;
166        inspect `exit_code` and `output` to determine success.
167
168        Args:
169            computer: Computer ID (`cmp_...`). The computer on which to run the command.
170            input: Request body.
171            input.command: Shell command to execute, e.g. `"ls -la /home"`.
172            input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
173
174        Returns:
175            The output and exit code produced by the command.
176        """
177        return self._http.request(
178            f"/api/v1/agent_computers/{computer}/exec",
179            method="POST",
180            body=input,
181            response_type=ComputerExecResult,
182        )
183
184    def refresh(self, computer: str) -> AgentComputer:
185        """
186        Refresh a computer's status
187        Fetches the latest status for the specified computer from the upstream
188        provisioning provider and updates the platform record accordingly. Use this
189        endpoint to reconcile a computer whose `status` appears stale or stuck in
190        a transitional state such as `provisioning`.
191        Requires an app-scoped API key. Returns 422 if the computer has not been
192        fully provisioned yet. The updated computer object is returned on success.
193
194        Args:
195            computer: Computer ID (`cmp_...`). The computer whose status should be refreshed.
196
197        Returns:
198            The computer record with its status updated from the provisioning provider.
199        """
200        return self._http.request(
201            f"/api/v1/agent_computers/{computer}/refresh",
202            method="POST",
203            response_type=AgentComputer,
204        )
AgentComputerResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
116    def __init__(self, http: SyncHttpClient):
117        self._http = http
def delete(self, computer: str) -> None:
119    def delete(self, computer: str) -> None:
120        """
121        Delete a computer
122        Permanently deletes the specified computer and releases all associated
123        infrastructure resources. This action is irreversible once deleted,
124        the computer cannot be recovered and its ID becomes invalid.
125        Requires an app-scoped API key. The computer must belong to the same app.
126        Returns `204 No Content` on success.
127
128        Args:
129            computer: Computer ID (`cmp_...`). The computer to delete.
130
131        Returns:
132            Empty response body. Returns HTTP 204 on success.
133        """
134        self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE")

Delete a computer Permanently deletes the specified computer and releases all associated infrastructure resources. This action is irreversible once deleted, the computer cannot be recovered and its ID becomes invalid. Requires an app-scoped API key. The computer must belong to the same app. Returns 204 No Content on success.

Arguments:
  • computer: Computer ID (cmp_...). The computer to delete.
Returns:

Empty response body. Returns HTTP 204 on success.

def get(self, computer: str) -> archastro.platform.types.common.AgentComputer:
136    def get(self, computer: str) -> AgentComputer:
137        """
138        Retrieve a computer
139        Returns the computer identified by `computer`. The computer must belong to the
140        app associated with the API key.
141        Use this endpoint to inspect a computer's current `status`, `region`,
142        `config`, and `metadata` after provisioning or to verify its state before
143        issuing commands. For a live status update, use the refresh endpoint instead.
144
145        Args:
146            computer: Computer ID (`cmp_...`). The computer to retrieve.
147
148        Returns:
149            The requested computer.
150        """
151        return self._http.request(
152            f"/api/v1/agent_computers/{computer}",
153            response_type=AgentComputer,
154        )

Retrieve a computer Returns the computer identified by computer. The computer must belong to the app associated with the API key. Use this endpoint to inspect a computer's current status, region, config, and metadata after provisioning or to verify its state before issuing commands. For a live status update, use the refresh endpoint instead.

Arguments:
  • computer: Computer ID (cmp_...). The computer to retrieve.
Returns:

The requested computer.

def exec( self, computer: str, input: AgentComputerExecInput) -> archastro.platform.types.common.ComputerExecResult:
156    def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult:
157        """
158        Execute a command on a computer
159        Runs a shell command on the specified computer and returns its combined
160        output and exit code. The call blocks until the command completes; there
161        is no streaming or timeout override plan accordingly for long-running
162        commands.
163        Requires an app-scoped API key. The computer must be in the `running`
164        state. Commands run as the default unprivileged user on the computer.
165        A non-zero `exit_code` in the response does not produce an HTTP error;
166        inspect `exit_code` and `output` to determine success.
167
168        Args:
169            computer: Computer ID (`cmp_...`). The computer on which to run the command.
170            input: Request body.
171            input.command: Shell command to execute, e.g. `"ls -la /home"`.
172            input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
173
174        Returns:
175            The output and exit code produced by the command.
176        """
177        return self._http.request(
178            f"/api/v1/agent_computers/{computer}/exec",
179            method="POST",
180            body=input,
181            response_type=ComputerExecResult,
182        )

Execute a command on a computer Runs a shell command on the specified computer and returns its combined output and exit code. The call blocks until the command completes; there is no streaming or timeout override plan accordingly for long-running commands. Requires an app-scoped API key. The computer must be in the running state. Commands run as the default unprivileged user on the computer. A non-zero exit_code in the response does not produce an HTTP error; inspect exit_code and output to determine success.

Arguments:
  • computer: Computer ID (cmp_...). The computer on which to run the command.
  • input: Request body.
  • input.command: Shell command to execute, e.g. "ls -la /home".
  • input.dir: Absolute path to use as the working directory when executing the command. Defaults to the computer's home directory when omitted.
Returns:

The output and exit code produced by the command.

def refresh(self, computer: str) -> archastro.platform.types.common.AgentComputer:
184    def refresh(self, computer: str) -> AgentComputer:
185        """
186        Refresh a computer's status
187        Fetches the latest status for the specified computer from the upstream
188        provisioning provider and updates the platform record accordingly. Use this
189        endpoint to reconcile a computer whose `status` appears stale or stuck in
190        a transitional state such as `provisioning`.
191        Requires an app-scoped API key. Returns 422 if the computer has not been
192        fully provisioned yet. The updated computer object is returned on success.
193
194        Args:
195            computer: Computer ID (`cmp_...`). The computer whose status should be refreshed.
196
197        Returns:
198            The computer record with its status updated from the provisioning provider.
199        """
200        return self._http.request(
201            f"/api/v1/agent_computers/{computer}/refresh",
202            method="POST",
203            response_type=AgentComputer,
204        )

Refresh a computer's status Fetches the latest status for the specified computer from the upstream provisioning provider and updates the platform record accordingly. Use this endpoint to reconcile a computer whose status appears stale or stuck in a transitional state such as provisioning. Requires an app-scoped API key. Returns 422 if the computer has not been fully provisioned yet. The updated computer object is returned on success.

Arguments:
  • computer: Computer ID (cmp_...). The computer whose status should be refreshed.
Returns:

The computer record with its status updated from the provisioning provider.