Add Variant From Image
POST/apps/:app_id/variant/from-image
Add a new variant to an app based on a Docker image.
Args: app_id (str): The ID of the app to add the variant to. payload (AddVariantFromImagePayload): The payload containing information about the variant to add. stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).
Raises: HTTPException: If the feature flag is set to "demo" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app.
Returns: dict: The newly added variant.
Request
Path Parameters
app_id App Idrequired
- application/json
Body
required
variant_name Variant Name (string)required
docker_id Docker Id (string)required
tags Tags (string)required
base_name Base Name (string)
config_name Config Name (string)
Responses
- 200
- 422
Successful Response
- application/json
- Schema
Schema
any
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
msg Message (string)required
type Error Type (string)required
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
Loading...