Import applications from GitHub
import requests
url = "https://platform.ankra.app/api/v1/org/applications/imports/github"
payload = {
"app_repo_credential_name": "<string>",
"source_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({app_repo_credential_name: '<string>', source_url: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/imports/github', 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/applications/imports/github \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_repo_credential_name": "<string>",
"source_url": "<string>"
}
'{
"is_truncated": true,
"source": "<string>",
"account": "<string>",
"repositories": [
{
"repository": "<string>",
"description": "<string>",
"language": "<string>",
"default_branch": "<string>",
"web_url": "<string>",
"is_archived": true,
"is_fork": true,
"is_recommended": true,
"signals": [
"<string>"
],
"state": "ready",
"import_repository": "<string>",
"application_name": "<string>",
"application_id": "<string>",
"fork_url": "<string>",
"settings_url": "<string>",
"message": "<string>"
}
],
"errors": [
{
"key": "<string>",
"message": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Applications
Import applications from GitHub
Import applications from GitHub repositories the connected account does not own. Every selected repository that is ready is registered as an application on the connected account’s repository (its fork of the source) and set up like any other application; the response carries each repository’s state, created with application_id for the ones registered. A repository still fork_required or not_granted is reported, not registered, so a client calls the route again once the person has forked it. An application name defaults to the repository name. With no repositories, a single-repository source_url imports that repository. Refusals a caller can act on come back as errors with a 200. Requires applications.write.
POST
/
api
/
v1
/
org
/
applications
/
imports
/
github
Import applications from GitHub
import requests
url = "https://platform.ankra.app/api/v1/org/applications/imports/github"
payload = {
"app_repo_credential_name": "<string>",
"source_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({app_repo_credential_name: '<string>', source_url: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/imports/github', 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/applications/imports/github \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_repo_credential_name": "<string>",
"source_url": "<string>"
}
'{
"is_truncated": true,
"source": "<string>",
"account": "<string>",
"repositories": [
{
"repository": "<string>",
"description": "<string>",
"language": "<string>",
"default_branch": "<string>",
"web_url": "<string>",
"is_archived": true,
"is_fork": true,
"is_recommended": true,
"signals": [
"<string>"
],
"state": "ready",
"import_repository": "<string>",
"application_name": "<string>",
"application_id": "<string>",
"fork_url": "<string>",
"settings_url": "<string>",
"message": "<string>"
}
],
"errors": [
{
"key": "<string>",
"message": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Response
Successful Response