With the deployments
endpoint, you can get deployment details like the deployment progress and more.
You can also send a POST
request to the endpoint to manually or programmatically deploy a static site. This request can be done from your terminal or using an automated script or CI/CD pipeline (e.g. CircleCI, Jenkins, etc.).
You can obtain the deployment_id
from the static_sites
endpoint.
The deployment_id
is also shown in the URL within the deployment in MyKinsta, for example in the URL https://my.kinsta.com/staticSite/hello-world-astro-7u8mu/deployment/6783883e-4af8-47ab-a03a-3db6177d4291?idCompany=bdd25d71-5706-4890-870f-1adda17c505d
the deployment_id
is 6783883e-4af8-47ab-a03a-3db6177d4291
.
Response object of static site deployment by ID requests
No or invalid API key provided to the request
Could not find the static site deployment or the user does not have permissions to retrieve data
Error occurred while retrieving static site deployment
{- "deployment": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "static_site_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "status": "inProgress",
- "branch": "main",
- "author_login": "jane-doe",
- "commit_sha": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "commit_message": "Merge pull request #123",
- "cloud_build_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "created_at": 1665382600770,
- "updated_at": 1665394600620,
- "finished_at": 1665406600330,
- "started_at": 1665418600450
}
}
Deployment created successfully
No or invalid API key provided to the request
Error occurred while creating the deployment
{- "static_site_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "branch": "main"
}
{- "deployment": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "status": "waiting"
}
}
Deployment created successfully
No or invalid API key provided to the request
Error occurred while creating the deployment
{- "static_site_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "deployment_id": "12fb80af-576d-4fdc-ra4f-b596c83f86yv"
}
{- "deployment": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "status": "waiting"
}
}