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/deployments

Headers

HeaderRequiredDescription
x-api-keyYesProject API Key
x-organization-idYesActive project organization

Path Parameters

ParameterTypeDescription
idstringProject 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

FieldDescription
idDeployment record identifier
project_idProject related to the event
updated_imageIndicates whether the event involved an image update
created_atEvent 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

CodeLikely reasonHow to fix
401Authentication header is missingSend x-api-key
403Invalid organization or permissionConfirm x-organization-id and project access
404Project not foundCheck Project ID, API Key, and organization
500Failed to fetch historyRetry or contact support

Next Steps