Rebase a stack profile draft
import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/drafts/{draft_id}/rebase"
payload = {}
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({})
};
fetch('https://platform.ankra.app/api/v1/org/stack-profiles/drafts/{draft_id}/rebase', 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/stack-profiles/drafts/{draft_id}/rebase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"spec": {},
"parameters": [
{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"type": "string",
"required": false,
"default": "<string>",
"enum_values": [
"<string>"
],
"pattern": "<string>",
"group": "<string>",
"resource_kind": "<string>",
"resource_name": "<string>",
"path": "<string>",
"options": [
{
"value": "<string>",
"title": "<string>",
"description": "<string>",
"sets": {}
}
]
}
],
"base_version": 123,
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"requested_visibility": "<string>",
"suggestion_target_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"suggestion_base_version": 123
},
"from_version": 123,
"to_version": 123,
"upstream_changes": [
{
"key": "<string>",
"change_type": "added",
"content_hash_before": "<string>",
"content_hash_after": "<string>",
"source": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Stack Profiles
Rebase a stack profile draft
Moves a draft onto the profile’s latest published version, either reseeding its contents (reseed) or keeping them and only advancing the base version (acknowledge). Returns the draft and the upstream changes in between.
POST
/
api
/
v1
/
org
/
stack-profiles
/
drafts
/
{draft_id}
/
rebase
Rebase a stack profile draft
import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/drafts/{draft_id}/rebase"
payload = {}
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({})
};
fetch('https://platform.ankra.app/api/v1/org/stack-profiles/drafts/{draft_id}/rebase', 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/stack-profiles/drafts/{draft_id}/rebase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"spec": {},
"parameters": [
{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"type": "string",
"required": false,
"default": "<string>",
"enum_values": [
"<string>"
],
"pattern": "<string>",
"group": "<string>",
"resource_kind": "<string>",
"resource_name": "<string>",
"path": "<string>",
"options": [
{
"value": "<string>",
"title": "<string>",
"description": "<string>",
"sets": {}
}
]
}
],
"base_version": 123,
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"requested_visibility": "<string>",
"suggestion_target_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"suggestion_base_version": 123
},
"from_version": 123,
"to_version": 123,
"upstream_changes": [
{
"key": "<string>",
"change_type": "added",
"content_hash_before": "<string>",
"content_hash_after": "<string>",
"source": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
reseed replaces the draft with the latest version; acknowledge keeps the draft and moves its base version forward.
Available options:
reseed, acknowledge