Update an application's generated files
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/files"
payload = { "files": [
{
"path": "<string>",
"content": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{path: '<string>', content: '<string>'}]})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"content": "<string>"
}
]
}
'{
"commit_sha": "<string>",
"pull_request_url": "<string>",
"success": true,
"message": "<string>"
}Applications
Update an application's generated files
Commits edited (and deleted) generated files to the application’s setup branch and opens or updates its pull request. Needs applications.write. A commit the repository refuses answers 422 with the reason.
PATCH
/
api
/
v1
/
org
/
applications
/
{application_id}
/
files
Update an application's generated files
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/files"
payload = { "files": [
{
"path": "<string>",
"content": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({files: [{path: '<string>', content: '<string>'}]})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"content": "<string>"
}
]
}
'{
"commit_sha": "<string>",
"pull_request_url": "<string>",
"success": true,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The application's id.
Body
application/json