Get a site's Git repository
import requests
url = "https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/git"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/git', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/git \
--header 'Authorization: Bearer <token>'{
"site_name": "<string>",
"provider": "github",
"repository_owner": "<string>",
"repository_name": "<string>",
"production_branch": "<string>",
"root_directory": "<string>",
"previews": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}Pages
Get a site's Git repository
Answers the GitHub repository the site deploys from: its production branch, the directory the site is served from, and whether branches and pull requests deploy previews. Needs applications.read.
GET
/
api
/
v1
/
org
/
pages
/
sites
/
{site_name}
/
git
Get a site's Git repository
import requests
url = "https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/git"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/git', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/pages/sites/{site_name}/git \
--header 'Authorization: Bearer <token>'{
"site_name": "<string>",
"provider": "github",
"repository_owner": "<string>",
"repository_name": "<string>",
"production_branch": "<string>",
"root_directory": "<string>",
"previews": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason": "<string>",
"code": "<string>",
"message": "<string>",
"missing_sha256": [
"<string>"
]
}Authorizations
Response
The repository the site deploys from.
The GitHub repository a site deploys from.