Returns a single organization rule by ID.
This endpoint requires admin privileges.
Bearer token obtained from the authenticate endpoint. The authenticated user must be an admin.
UUID of the rule to retrieve.
Response
Organization this rule belongs to.
Member ID of the admin who created this rule.
Member ID of the admin who last updated this rule.
Display name of the admin who last updated this rule.
ISO 8601 timestamp when the rule was created.
ISO 8601 timestamp when the rule was last updated.
curl -X GET https://api.trellis.sh/v1/organization-rules/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
-H "Authorization: Bearer YOUR_TOKEN"
import requests
rule_id = "b2c3d4e5-f6a7-8901-bcde-f12345678901"
response = requests.get(
f"https://api.trellis.sh/v1/organization-rules/{rule_id}",
headers={"Authorization": "Bearer YOUR_TOKEN"},
)
rule = response.json()
const ruleId = "b2c3d4e5-f6a7-8901-bcde-f12345678901";
const response = await fetch(
`https://api.trellis.sh/v1/organization-rules/${ruleId}`,
{
headers: { Authorization: "Bearer YOUR_TOKEN" },
}
);
const rule = await response.json();
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"organization_id": "org_01HX...",
"content": "Always cite the data source when presenting figures",
"created_by": "member_01HX...",
"last_updated_by": "member_01HX...",
"last_updated_by_name": "Jane Smith",
"created_at": "2025-02-10T08:00:00+00:00",
"updated_at": "2025-02-10T08:00:00+00:00"
}
{
"detail": "Missing Authorization header"
}
{
"detail": "Admin privileges required"
}
{
"detail": "Organization rule not found"
}