/v1/private/prompts/versions/{versionId}/environmentsSet prompt version environmentSet or clear the environment owned by a prompt version. Setting a non-null environment moves ownership atomically: any previous owner of that environment for the same prompt has its environment cleared in the same transaction. Setting null clears the environment from the version. The environment must already exist in the workspace registry; unknown names return 404.
Parameters
versionIdstring · uuidpathrequiredRequest body
application/json
Replace the full set of environments assigned to a prompt version. The provided set becomes the new complete set of environments for this version. - Non-empty set: assigns each environment to this version; if another version of the same prompt currently owns any of those environments, ownership is moved atomically. - Empty set: clears all environments from this version. All environments must already exist in the workspace registry; unknown names return 404.
environmentsarray of stringrequiredShow child attributes
{
"environments": [
"string"
]
}Responses
codeinteger · int32detailsstringmessagestring{
"code": 0,
"details": "string",
"message": "string"
}codeinteger · int32detailsstringmessagestring{
"code": 0,
"details": "string",
"message": "string"
}