Skip to main content

Start Variant

PUT 

https://cloud.agenta.ai/api/variants/:variant_id

Start a variant of an app.

Args: variant_id (str): The ID of the variant to start. action (VariantAction): The action to perform on the variant (start). env_vars (Optional[DockerEnvVars], optional): The environment variables to inject to the Docker container. Defaults to None. stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).

Returns: URI: The URL of the started variant.

Raises: HTTPException: If the app container cannot be started.

Request

Path Parameters

    variant_id Variant Idrequired

Body

required

    action

    object

    required

    action VariantActionEnum (string)required

    Possible values: [START, STOP]

    env_vars

    object

    anyOf

    env_vars

    object

    required

    property name* string

Responses

Successful Response

Schema

    uri Uri (string)required
curl -L -X PUT 'https://cloud.agenta.ai/api/variants/:variant_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"action": {
"action": "START"
},
"env_vars": {
"env_vars": {}
}
}'
Request Collapse all
Base URL
https://cloud.agenta.ai/api
Auth
Parameters
— pathrequired
Body required
{
  "action": {
    "action": "START"
  },
  "env_vars": {
    "env_vars": {}
  }
}
ResponseClear

Click the Send API Request button above and see the response here!