Finalize a deployment
import requests
url = "https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deployments/{deployment_id}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deployments/{deployment_id}/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deployments/{deployment_id}/finalize \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "uploading",
"alias": "<string>",
"source": "api",
"file_count": 123,
"total_bytes": 123,
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"upload_expires_at": "2023-11-07T05:31:56Z",
"error_message": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}Pages
Finalize a deployment
Reads back every file the deployment waits for and puts the deployment live under its alias once each was uploaded as exactly the bytes its sha256 and size declare. Finalizing a deployment that is already live returns it unchanged. Needs applications.deploy.
POST
/
api
/
v1
/
org
/
pages
/
sites
/
{site_name}
/
deployments
/
{deployment_id}
/
finalize
Finalize a deployment
import requests
url = "https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deployments/{deployment_id}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deployments/{deployment_id}/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deployments/{deployment_id}/finalize \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "uploading",
"alias": "<string>",
"source": "api",
"file_count": 123,
"total_bytes": 123,
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"upload_expires_at": "2023-11-07T05:31:56Z",
"error_message": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}Authorizations
Path Parameters
Response
The deployment is live.
An immutable deployment of a site. A deployment still uploading when its upload window closes is expired: it can no longer be finalized.