Get Project Information
Returns the current project state, including status, plan, domain, instances, storage, port, public deploy settings, and additional information by project type.
GET /project/:idPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Project ID (ObjectId) |
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Project API Key |
x-organization-id | Yes | Active project organization |
Content-Type: application/json | Conditional | Required only for PATCH calls |
Response
The example below is reduced to highlight the most commonly used fields. The response may also include fields such as github, image, last_deployment, total_amount_used, renew_automatic_contract, custom_domains, network_access, build_failure, updated_at, and created_at.
For HTTP projects, exposure indicates whether the application has a public route (public) or runs without a public domain (private). Private projects may return an empty or absent domain.
{
"status": "success",
"message": "get deployment with success",
"data": {
"name": "my-project",
"description": "My web application",
"domain": "my-project.clients.zenifra.com",
"plan": "basic",
"status": "running",
"type_project": "http",
"exposure": "public",
"instances": 2,
"storage": {
"persistent": false,
"capacity": 1
},
"payment_mode": "hourly",
"port": 3000,
"additional_info": {
"current_instances": 2,
"max_cpu": "1",
"max_memory": "1Gi"
}
}
}Update Project Exposure
Changes whether an HTTP project exposes a public route.
PATCH /project/:id/exposureBody
| Field | Type | Required | Description |
|---|---|---|---|
exposure | string | Yes | Use public to create a public route/domain or private to remove public exposure |
{
"exposure": "private"
}Private projects do not receive a Zenifra subdomain and cannot configure a public domain while they remain private.
Response
{
"status": "success",
"message": "project exposure updated with success",
"exposure": "private",
"domain": "",
"custom_domains": []
}When changing to private, the API removes the public route, default subdomain, and custom domains. When changing to public, the API provisions the public route again and returns the available domain.
Update Project Name
Changes the project name.
PATCH /project/:id/namePath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Project ID (ObjectId) |
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | New project name (minimum 6 characters, maximum 32, lowercase letters and numbers only, hyphens allowed) |
Example
{
"name": "my-new-project"
}Response
{
"status": "success",
"message": "updated with success"
}Update Project Description
Changes the project description.
PATCH /project/:id/descriptionPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Project ID (ObjectId) |
Body
| Field | Type | Required | Description |
|---|---|---|---|
description | string | No | New project description (maximum 256 characters) |
Response
{
"status": "success",
"message": "updated with success"
}Examples
Update Name
curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/name" \
-H "x-api-key: your-api-key" \
-H "x-organization-id: your-organization-id" \
-H "Content-Type: application/json" \
-d '{"name": "my-new-project"}'Update Description
curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/description" \
-H "x-api-key: your-api-key" \
-H "x-organization-id: your-organization-id" \
-H "Content-Type: application/json" \
-d '{"description": "My web application in production"}'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}
# Get information
project = requests.get(
f"https://api.zenifra.com/v1/project/{PROJECT_ID}",
headers=headers
).json()
print(project)
# Update name
requests.patch(
f"https://api.zenifra.com/v1/project/{PROJECT_ID}/name",
headers=headers,
json={"name": "my-new-project"}
)
# Update description
requests.patch(
f"https://api.zenifra.com/v1/project/{PROJECT_ID}/description",
headers=headers,
json={"description": "My web application in production"}
)