Apply secrets to many computers
Write vault secrets onto every computer in a workspace, or a list of computers, in one call. Take them off, or preview what either would change.
remove: true it takes them off instead, and with dry_run: true it changes nothing and says what each computer would get. Each computer gets what Apply secrets to a computer gives it: the same files, the same agent env files, and the same report. Values are never returned.
not_changed. Start or wake it, then send its id again.Body parameters
ORGO_API_KEY returns 422.instance_id. Orgo sends to exactly these computers. Duplicates are ignored. null is the same as leaving it out.computer_ids, every computer in this workspace is in scope. With computer_ids, it does not choose computers, but it must still be a workspace you can change. Any other string, an id in capitals included, returns 403. null is the same as leaving it out.true takes the names off the computers instead of writing them, as described in Remove secrets from a computer.true changes nothing. Each computer answers what an apply, or with remove: true a removal, would change there, as described in Preview what would change.remove and dry_run are each true, false, or left out. Any other value returns 400. Fields this endpoint does not take, such as wake, are ignored.
Which computers
- An account secret goes to every workspace you own.
- A secret saved only for a workspace goes to that workspace, whoever owns it.
- A workspace someone else owns does not get account secrets, because its other members, and the agents they talk to, could read what you send. Name it in
workspace_id, or its computers incomputer_ids, to include it. Unless every name you send that has an account value also has its own value saved for that workspace, none of those names go there, not even the workspace’s own values. Names saved only for that workspace still go there. When nothing goes there, its running computers are listed asnot_changed, with how to include them. - With
remove: true, an account secret is taken off every workspace you own, except where a workspace has its own secret with that name. Its computers got the workspace’s value, so the name stays there. When that leaves nothing to remove in a workspace, its computers are listed asnot_changed. - A removal leaves out a workspace someone else owns in the same way, because it takes the name off whatever its value, so it would also take another member’s value of that name. Name the workspace or its computers to include it. A secret saved only for that workspace is still taken off there.
- A workspace you can only view is never changed. When a secret saved only for that workspace names it, its computers are listed as
not_changed, saying you can only view it. Otherwise it is not listed. - Client workspaces you created under Invoicing are left out. Name them in
workspace_idorcomputer_ids. - A name that is in none of your vaults returns
404withcode: "secret_not_found".
How the call runs
Orgo works on four computers at a time, and never wakes one. A computer whose secrets are too large to send in one call is sent them in halves. No computer starts after 45 seconds, and a computer sent its secrets in halves starts no next half after that. Computers already under way finish, so the answer can take longer than 45 seconds. Orgo starts no step on a computer that could still be running 90 seconds into the call. A removal leaves out its second step on/root/.env when time is short, and that computer’s report says the line stays.
The computers that did not start are in remaining, and next holds the calls that finish the job.
Response
not_changed while choosing them.computer_ids, or computer UUIDs otherwise. Empty when every computer ran.remaining, each call with the names those computers were due. Send each one to this endpoint as it is. Empty when remaining is.Cache-Control: no-store.
Outcomes
Continue with remaining
Whenremaining is not empty, send each body in next to this endpoint as it is, and do the same with each answer until next is empty. Running the same apply on a computer twice is safe: the values are merged, not added twice.
Each body in next names the computers in computer_ids, up to 100 a call, which is the most computer_ids takes. Its names are what those computers were due. With the default scope that can be fewer than you sent: a workspace with its own value for a name keeps it on a removal, and a secret saved for one workspace goes to that workspace only. Sending every name to those computers instead fails where a name is not in your vault for the computer’s workspace, and a removal would take off a name the workspace keeps its own value for.
Errors
failed or not_changed result.
Example
The cURL call previews what applyingANTHROPIC_API_KEY would change on every computer in a workspace. The Python one applies it, then sends each body in next until every computer has run. Set $WORKSPACE_ID to the workspace’s id.
Response
Authorizations
API key authentication. Get your key at orgo.ai/workspaces
Body
The vault names to apply, remove, or preview. Duplicates are ignored. ORGO_API_KEY answers 422.
1 - 50 elementsAn environment variable name: letters, digits, and underscores, not starting with a digit, up to 64 characters.
^[A-Za-z_][A-Za-z0-9_]{0,63}$Exactly these computers. Duplicates are ignored. null is the same as leaving it out.
1 - 100 elementsA computer UUID or instance_id.
^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$Without computer_ids: every computer in this workspace. With computer_ids it does not choose computers, but it must still be a workspace you can change. A string that is not the id of a workspace you are a member of, a UUID in capitals included, answers 403. null is the same as leaving it out.
true takes the names off the computers instead of writing them.
true changes nothing. Each computer answers what an apply, or with remove: true a removal, would change there.
Response
Each computer's outcome. The answer carries Cache-Control: no-store.
The names sent, without duplicates.
One entry per computer, in the order of the computers in scope, followed by the computers found not_changed while choosing them.
The computers that did not start before the time ran out: the ids as sent in computer_ids, or computer UUIDs otherwise. next holds the calls that finish them.
The calls that finish the job: the computers in remaining, grouped by the names each was due, up to 100 a call. Send each one to this endpoint as it is. With neither computer_ids nor workspace_id, a workspace can be due fewer names than were sent. Empty when remaining is.