Get Deployments
The Deployments API allows you to retrieve deployed prompts from your prompt. This API provides two main operations: retrieving a specific deployment by ID and retrieving the latest deployment for a given environment.
Header
All requests require a valid workspace API key passed in the Authorization
header:
Parameters
The unique identifier of the prompt.
The unique identifier of the deployment.
Response
The unique identifier of the deployment.
Unix timestamp when the deployment was created.
Unix timestamp when the deployment was last updated.
ID of the user who created the deployment.
ID of the user who last updated the deployment.
The unique identifier of the project.
The unique identifier of the prompt.
The unique identifier of the deployment environment.
The prompt, see PromptType for more details.
Best Practices
-
Cache Deployments: Cache deployment responses when possible to reduce API calls and improve performance.
-
Error Handling: Always implement proper error handling for all possible HTTP status codes.
-
Environment Management: Use different deployment environments (production, staging, development) to manage your prompt lifecycle.
-
Rate Limit Awareness: Monitor your usage to avoid hitting rate limits, especially on free plans.