Deployment History
Use this endpoint to list deployment records for a project in the current month. It helps audit changes, confirm whether an image update created history, and build simple activity dashboards.
Endpoint
GET /project/:id/historic/deploymentsHeaders
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Project API Key |
x-organization-id | Yes | Active project organization |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Project ID (ObjectId) |
Query Window
The API returns deployments created between the beginning and the end of the current month, based on the server clock. This route does not expose public parameters to change that window.
Response
{
"status": "success",
"message": "get deployments with success",
"data": [
{
"id": "665f1f77bcf86cd799439011",
"project_id": "507f1f77bcf86cd799439011",
"updated_image": true,
"created_at": "2026-05-23T14:10:00.000Z"
}
]
}How to Read It
| Field | Description |
|---|---|
id | Deployment record identifier |
project_id | Project related to the event |
updated_image | Indicates whether the event involved an image update |
created_at | Event creation date |
Examples
curl
curl -X GET "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/historic/deployments" \
-H "x-api-key: your-api-key" \
-H "x-organization-id: your-organization-id"Python
import requests
API_KEY = "your-api-key"
ORGANIZATION_ID = "your-organization-id"
PROJECT_ID = "507f1f77bcf86cd799439011"
headers = {"x-api-key": API_KEY, "x-organization-id": ORGANIZATION_ID}
deployments = requests.get(
f"https://api.zenifra.com/v1/project/{PROJECT_ID}/historic/deployments",
headers=headers
).json()
print(deployments)Node.js
const axios = require('axios');
const API_KEY = 'your-api-key';
const ORGANIZATION_ID = 'your-organization-id';
const PROJECT_ID = '507f1f77bcf86cd799439011';
axios.get(
`https://api.zenifra.com/v1/project/${PROJECT_ID}/historic/deployments`,
{ headers: { 'x-api-key': API_KEY, 'x-organization-id': ORGANIZATION_ID } }
).then((response) => console.log(response.data));Common Errors
| Code | Likely reason | How to fix |
|---|---|---|
401 | Authentication header is missing | Send x-api-key |
403 | Invalid organization or permission | Confirm x-organization-id and project access |
404 | Project not found | Check Project ID, API Key, and organization |
500 | Failed to fetch history | Retry or contact support |
Next Steps
- Use Update Deploy Image to start a new image-based deploy.
- Check Project Information to see the current status.
- Review Metrics and Logs after a deployment.