# Get all tags for a subject
curl -X GET 'https://api.example.com/tag-assignments?targetType=subject&targetId=subject_jane' \
-H 'Authorization: Bearer YOUR_TOKEN'
# Get all assignments for a tag
curl -X GET 'https://api.example.com/tag-assignments?tagId=tag_engineering' \
-H 'Authorization: Bearer YOUR_TOKEN'
[
{
"id": "tag_assignment_001",
"tagId": "tag_engineering",
"targetType": "subject",
"targetId": "subject_jane",
"scopeId": "scope_acme",
"appliedBy": "subject_admin",
"appliedAt": "2024-01-15T10:30:00Z"
},
{
"id": "tag_assignment_002",
"tagId": "tag_backend",
"targetType": "subject",
"targetId": "subject_jane",
"scopeId": "scope_acme",
"appliedBy": "subject_admin",
"appliedAt": "2024-01-15T10:30:01Z"
}
]
Tag Assignments
Get Tag Assignments
List tag assignments with optional filters
GET
/
tag-assignments
# Get all tags for a subject
curl -X GET 'https://api.example.com/tag-assignments?targetType=subject&targetId=subject_jane' \
-H 'Authorization: Bearer YOUR_TOKEN'
# Get all assignments for a tag
curl -X GET 'https://api.example.com/tag-assignments?tagId=tag_engineering' \
-H 'Authorization: Bearer YOUR_TOKEN'
[
{
"id": "tag_assignment_001",
"tagId": "tag_engineering",
"targetType": "subject",
"targetId": "subject_jane",
"scopeId": "scope_acme",
"appliedBy": "subject_admin",
"appliedAt": "2024-01-15T10:30:00Z"
},
{
"id": "tag_assignment_002",
"tagId": "tag_backend",
"targetType": "subject",
"targetId": "subject_jane",
"scopeId": "scope_acme",
"appliedBy": "subject_admin",
"appliedAt": "2024-01-15T10:30:01Z"
}
]
Query Parameters
string
Filter by tag ID
string
Filter by target type. One of:
resource, subject, role, permissionstring
Filter by target ID
string
Filter by scope ID
string
Filter by tag group ID (returns assignments for all tags in the group)
Response
Returns an array of tag assignment objects.# Get all tags for a subject
curl -X GET 'https://api.example.com/tag-assignments?targetType=subject&targetId=subject_jane' \
-H 'Authorization: Bearer YOUR_TOKEN'
# Get all assignments for a tag
curl -X GET 'https://api.example.com/tag-assignments?tagId=tag_engineering' \
-H 'Authorization: Bearer YOUR_TOKEN'
[
{
"id": "tag_assignment_001",
"tagId": "tag_engineering",
"targetType": "subject",
"targetId": "subject_jane",
"scopeId": "scope_acme",
"appliedBy": "subject_admin",
"appliedAt": "2024-01-15T10:30:00Z"
},
{
"id": "tag_assignment_002",
"tagId": "tag_backend",
"targetType": "subject",
"targetId": "subject_jane",
"scopeId": "scope_acme",
"appliedBy": "subject_admin",
"appliedAt": "2024-01-15T10:30:01Z"
}
]
Was this page helpful?
⌘I