Skip to content
Last updated
GEThttps://api.aitronos.com/v1/rules/entities/{entity_type}/{entity_id}/rules

List all rules attached to a specific entity, ordered by priority.

entity_type string required

Entity type: assistant, user, model, vector_store, organization

entity_id string required

The entity ID

Query parameters

is_active boolean optional

Filter by active status

include_rule_details boolean optional

Include full rule content (default: false)

Returns

Returns a list of rules attached to the entity, ordered by priority (highest first).

Bash
curl "https://api.aitronos.com/v1/rules/entities/assistant/asst_abc123/rules?include_rule_details=true" \
  -H "X-API-Key: $FREDDY_API_KEY"

Response 200 OK

{
  "success": true,
  "data": [
    {
      "attachment": {
        "rule_id": "rule_a1b2c3d4",
        "entity_type": "assistant",
        "entity_id": "asst_abc123",
        "priority": 90,
        "character_limit": 1000,
        "is_active": true
      },
      "rule": {
        "id": "rule_a1b2c3d4",
        "name": "Professional Communication",
        "content": "Always maintain professional tone...",
        "category": "professional",
        "rule_type": "behavior",
        "is_active": true
      }
    },
    {
      "attachment": {
        "rule_id": "rule_e5f6g7h8",
        "entity_type": "assistant",
        "entity_id": "asst_abc123",
        "priority": 70,
        "character_limit": 2000,
        "is_active": true
      },
      "rule": {
        "id": "rule_e5f6g7h8",
        "name": "Safety Guidelines",
        "content": "Follow safety protocols...",
        "category": "safety",
        "rule_type": "guardrails",
        "is_active": true
      }
    }
  ]
}