Set the team that owns an environment
People own an environment through the owner role (see the owners operations); a team is kept on the environment itself, since a team cannot hold a role. Send a null team to remove it. Setting the team it already has changes nothing.
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
environmentId*stringuuidIdempotency-Key?stringMakes retries safe. A repeated key with the same request returns the first result and sets
Idempotent-Replayed: true. The same key with a different request answers 409
idempotency.key_reused, and while the first request is still running 409
idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack
of sign-in or permission are not kept, so a retry runs again.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
teamId*|The owning team, or null for none. The team must belong to the organization.
The environment after the change.
application/json- response
view*"full""full"id*stringuuidname*stringdescription*stringclass*stringA label that says what kind of environment this is, such as production or staging.
order*integerPlace in lists, lowest first.
selector*Up to 50 key and value pairs.
properties <= 50archived*booleanclusterCount*integerdeploymentCount*integerThe deployments placed in the environment or on one of its clusters. Set when one environment is read, 0 in a list.
pipelineCount*integerThe active pipelines with a stage in the environment. Set when one environment is read, 0 in a list.
owners*array<string>User ids of the environment's owners, oldest first.
ownerTeam*|The team that owns the environment, or null. People own it through the owner role.
createdAt*stringdate-timeupdatedAt*stringdate-timecurl -X PUT 'https://wardn.example.com/api/v1/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/owner-team' \ -H 'Content-Type: application/json' \ -d '{ "teamId": "string"}'{ "view": "full", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "class": "production", "order": 0, "selector": { "property1": "string", "property2": "string" }, "archived": true, "clusterCount": 0, "deploymentCount": 0, "pipelineCount": 0, "owners": [ "string" ], "ownerTeam": { "id": "string", "name": "string" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}