Skip to main content
POST
/
api
/
v1
/
org
/
stack-profiles
/
import
Import Stack Profile Endpoint
import requests

url = "https://platform.ankra.app/api/v1/org/stack-profiles/import"

payload = { "content_base64": "<string>" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "profile": {
    "id": "<string>",
    "organisation_id": "<string>",
    "name": "<string>",
    "category": "<string>",
    "latest_version": 123,
    "current_version": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "tags": [],
    "source_cluster_id": "<string>",
    "created_by_user_id": "<string>"
  },
  "version": {
    "id": "<string>",
    "version": 123,
    "channel": "<string>",
    "spec": {
      "git_repository": {
        "credential_name": "<string>",
        "branch": "<string>",
        "repository": "<string>",
        "provider": "github"
      },
      "prometheus_metrics": {
        "endpoint": "<string>",
        "credential_name": "<string>",
        "flavor": "<string>"
      },
      "prometheus_credential": {
        "name": "<string>",
        "username": "<string>",
        "password": "<string>",
        "token": "<string>"
      },
      "stacks": [],
      "kubernetes": {
        "version": "0.0.0"
      },
      "provider": "imported",
      "argo_cd": {
        "namespace": "<string>",
        "version": "<string>"
      }
    },
    "created_at": "2023-11-07T05:31:56Z",
    "parameters": [],
    "redacted_secret_paths": {},
    "changelog": "<string>",
    "created_by_user_id": "<string>"
  },
  "warnings": []
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Body

application/json
content_base64
string
required
Maximum string length: 2097152
name
string | null
description
string | null
category
string
default:general
tags
string[]
changelog
string | null

Response

Successful Response

profile
StackProfileSummary · object
required
version
StackProfileVersionDetail · object
required
warnings
string[]