Stop Project

Pauses the project execution.

PATCH /project/:id/stop

Path Parameters

ParameterTypeDescription
idstringProject ID (ObjectId)

Headers

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

Response

{
  "status": "success",
  "message": "stopped project with success"
}

Resume Project

Resumes execution of a stopped project.

PATCH /project/:id/resume

Path Parameters

ParameterTypeDescription
idstringProject ID (ObjectId)

Response

{
  "status": "success",
  "message": "running project with success"
}

Examples

Stop Project

curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/stop" \
  -H "x-api-key: your-api-key" \
  -H "x-organization-id: your-organization-id"

Resume Project

curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/resume" \
  -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}

# Stop project
stop_response = requests.patch(
    f"https://api.zenifra.com/v1/project/{PROJECT_ID}/stop",
    headers=headers
).json()
print(stop_response)

# Resume project
resume_response = requests.patch(
    f"https://api.zenifra.com/v1/project/{PROJECT_ID}/resume",
    headers=headers
).json()
print(resume_response)

Use Cases

  • Maintenance: Pause the project during scheduled maintenance
  • Cost savings: Pause projects that don't need to run continuously
  • Testing: Pause test environments when not in use