Listing Templates
- Using the API:
- In Python:
curl -X GET -H "x-javelin-apikey: $JAVELIN_API_KEY" "https://your-api-domain.com/v1/admin/processors/dp/templates"
Javelin List Templates Example
from javelin_sdk import (
JavelinClient,
JavelinConfig,
Template
)
import os
# Retrieve environment variables
javelin_api_key = os.getenv('JAVELIN_API_KEY')
# create javelin client
config = JavelinConfig(
base_url="https://your-api-domain.com",
javelin_api_key=javelin_api_key
)
client = JavelinClient(config)
# print out the list of templates, for async use `await client.alist_templates()`
templates = client.list_templates()
print(templates.model_dump_json(indent=2))