Deploy a site from an archive
import requests
url = "https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deploy"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/gzip"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/gzip'},
body: '<string>'
};
fetch('https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deploy', 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}/deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/gzip' \
--data '<string>'{
"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>"
]
}{
"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
Deploy a site from an archive
Deploys a site in one request from a tar archive, gzipped or not, of at most 16 MiB that expands to at most 64 MiB. Paths in the archive are the site’s paths. Ankra hashes every file, stores the ones the organisation does not hold yet, and answers once the deployment is live. Links are refused; directories and macOS metadata files are skipped. Use a manifest deployment for a larger site. Needs applications.deploy.
POST
/
api
/
v1
/
org
/
pages
/
sites
/
{site_name}
/
deploy
Deploy a site from an archive
import requests
url = "https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deploy"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/gzip"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/gzip'},
body: '<string>'
};
fetch('https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/deploy', 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}/deploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/gzip' \
--data '<string>'{
"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>"
]
}{
"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
Query Parameters
Body
application/gzipapplication/x-tar
The body is of type file.
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.