Reset the change agent of a pull request or a revision

Deletes the change's agent, whether it is working or turned off, with its stage requests and the status they report. The change's next stage request creates a new agent, which acts for the caller that sends it. The caller must be a person or a workspace API key that could have created the agent, one that can do everything the agent does; a person must hold a role in the workspace. A change with no agent succeeds too, so a retry is safe; a retry sent after a new stage request has created a replacement agent resets that one. A stage request sent while a reset is in progress may be refused with change_agent_closed; sent again once the reset has returned, it starts validation again. Branch on error_code in an error body: invalid_request (400) and principal_too_narrow (403).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The change whose agent to turn off or reset.

string
required

The workspace the change agent runs in

reference
object
required

The pull request or the revision, as the stage requests name it

Responses
204

The change's agent is deleted, or the change had none

Language
Credentials
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json