Links

Serving API

​

list_servings

vessl.list_servings(
organization: str
)
Get a list of all servings in an organization
Args
  • organization (str) : The name of the organization.
Example
vessl.list_servings(organization="my-org")

create_revision_from_yaml

vessl.create_revision_from_yaml(
organization: str, serving_name: str, yaml_body: str
)
Create a new revision of serving from a YAML file.
Args
  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
  • yaml_body (str) : The YAML body of the serving. It is not deserialized YAML, but a whole yaml string.
Example
vessl.create_revision_from_yaml(
organization="my-org",
serving_name="my-serving",
yaml_body=yaml_body)

read_revision

vessl.read_revision(
organization: str, serving_name: str, revision_number: int
)
Get a serving revision from a serving name and revision number.
Args
  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
  • revision_number (int) : The revision number of the serving.
Example
vessl.read_revision(
organization="my-org",
serving_name="my-serving",
revision_number=1)

list_revisions

vessl.list_revisions(
organization: str, serving_name: str
)
Get a list of all revisions of a serving.
Args
  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
Examples
vessl.list_revisions(
organization="my-org",
serving_name="my-serving")

read_gateway

vessl.read_gateway(
organization: str, serving_name: str
)
Get the gateway of a serving.
Args
  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
Examples
vessl.read_gateway(
organization="my-org",
serving_name="my-serving")

update_gateway

vessl.update_gateway(
organization: str, serving_name: str,
gateway: ModelServiceGatewayUpdateAPIInput
)
Update the gateway of a serving.
Args
  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
  • gateway (ModelServiceGatewayUpdateAPIInput) : The gateway of the serving.
Examples
from openapi_client import ModelServiceGatewayUpdateAPIInput
from openapi_client import OrmModelServiceGatewayTrafficSplitEntry
​
gateway = ModelServiceGatewayUpdateAPIInput(
enabled=True,
endpoint="my-endpoint",
traffic_split=[
OrmModelServiceGatewayTrafficSplitEntry(
revision_number=1,
port=2222,
traffic_weight=100,
)
],
)
​
vessl.update_gateway(
organization="my-org",
serving_name="my-serving",
gateway=gateway)

update_gateway_for_revision

vessl.update_gateway_for_revision(
organization: str, serving_name: str, revision_number: int, port: int,
weight: int
)
Update the current gateway of a serving for a specific revision.
Args
  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
  • revision_number (int) : The revision number of the serving.
  • port (int) : The port of the revision will use for gateway.
  • weight (int) : The weight of the traffic will be distributed to revision_number.
Examples
vessl.update_gateway_for_revision(
organization="my-org",
serving_name="my-serving",
revision_number=1,
port=2222,
weight=100)

update_gateway_from_yaml

vessl.update_gateway_from_yaml(
organization: str, serving_name: str, yaml_body: str
)
Update the gateway of a serving from a YAML file.
Args
  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
  • yaml_body (str) : The YAML body of the serving. It is not deserialized YAML, but a whole yaml string
Examples
vessl.update_gateway_from_yaml(
organization="my-org",
serving_name="my-serving",
yaml_body=yaml_body)