Getting started
Get a project
Read project settings, status and the current runtime port, its source and lock timestamp. If the control plane is unavailable, runtimePortStatusUnavailable is true and the port fields are null. Secret values are excluded.
GET
/api/customer/v1/projects/{projectId}Path parameters
| Name | Value |
|---|---|
projectId | Required resource ID from an earlier API response. |
Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request GET "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}" \
--header "Authorization: Bearer $HCODE_API_KEY" Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"project": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"organizationId": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"projectType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"framework": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"buildType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"repositoryUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rootDirectory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"installCommand": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"buildCommand": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"startCommand": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"outputDirectory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"dockerfilePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"dockerContextPath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"dockerBuildStage": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"healthCheckPath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"subdomain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lastDeployedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"githubInstallationId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"hasDockerBuildArguments": {
"type": "boolean"
},
"hasDockerBuildSecrets": {
"type": "boolean"
},
"containerPort": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 65535
},
{
"type": "null"
}
]
},
"runtimePortSource": {
"anyOf": [
{
"type": "string",
"enum": [
"explicit",
"start_command",
"managed_static",
"default",
"legacy"
]
},
{
"type": "null"
}
]
},
"runtimePortLockedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"runtimePortStatusUnavailable": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"status"
],
"additionalProperties": true
}
},
"required": [
"project"
],
"additionalProperties": true
}See errors and retries for failure responses.