#!/usr/bin/env python3 """Test the REST API action mappings endpoint""" import requests import json # Test without authentication first (might fail, but let's see the output) url = "http://localhost:8000/api/v1/configuration/action-mappings/export" print(f"Testing: {url}") print("=" * 60) try: response = requests.get(url) print(f"Status Code: {response.status_code}") print(f"\nResponse:") if response.status_code == 200: data = response.json() # Pretty print first 5 mappings print(json.dumps({ "total_count": data.get("total_count"), "total_actions": data.get("total_actions"), "first_5_mappings": data.get("action_mappings", [])[:5] }, indent=2)) else: print(response.text) except Exception as e: print(f"Error: {e}")