Skip to main content
POST
/
api
/
v1
/
org
/
sops
/
encrypt
Encrypt content using SOPS
import requests

url = "https://platform.ankra.app/api/v1/org/sops/encrypt"

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

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

print(response.text)
{
  "encrypted_yaml": "<string>",
  "success": true
}

Authorizations

Authorization
string
header
required

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

Headers

authorization
string | null

Body

application/json
yaml_content
string
required
encrypted_paths
string[]
required

Response

Content encrypted successfully

encrypted_yaml
string
required
success
boolean
required