Skip to content

Deployments

Deployments represent configured AI assistants and pipelines in your Airia projects. See the Deployments API reference and response types for more details.

Get Deployments

You can retrieve a paged list of deployments using the get_deployments method:

from airia import AiriaClient

client = AiriaClient(api_key="your_api_key")

# Get all deployments
deployments = client.deployments.get_deployments(
    tags=["production"],
    is_recommended=True
)

print(f"Total deployments: {deployments.total_count}")

# Display deployment information
for deployment in deployments.items:
    print(f"Name: {deployment.deployment_name}")
    print(f"Description: {deployment.description}")
    print(f"Type: {deployment.deployment_type}")
    print(f"Conversation Type: {deployment.conversation_type}")
    print(f"Recommended: {deployment.is_recommended}")
    print(f"Pinned: {deployment.is_pinned}")
    print(f"Tags: {', '.join(deployment.tags)}")
    print(f"Project: {deployment.project_name}")
    print("---")

Get Single Deployment

You can retrieve a specific deployment by ID using the get_deployment method:

from airia import AiriaClient

client = AiriaClient(api_key="your_api_key")

# Get a specific deployment by ID
deployment = client.deployments.get_deployment("deployment-id-123")

print(f"Deployment: {deployment.deployment_name}")
print(f"Description: {deployment.description}")
print(f"Project: {deployment.project_id}")
print(f"Pipeline: {deployment.pipeline_name}")
print(f"Conversation Type: {deployment.conversation_type}")
print(f"Recommended: {deployment.is_recommended}")
print(f"Tags: {', '.join(deployment.tags)}")

# Access user prompts
print(f"User Prompts: {len(deployment.user_prompts)}")
for prompt in deployment.user_prompts:
    print(f"  - {prompt.name}: {prompt.description}")

# Access data sources
print(f"Data Sources: {len(deployment.data_sources)}")
for source in deployment.data_sources:
    print(f"  - {source.name}")

# Access about metadata if available
if deployment.about:
    print(f"About Version: {deployment.about.version}")
    print(f"Video URL: {deployment.about.video_url}")