# 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"
}
]
List tag assignments with optional filters
# 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"
}
]
resource, subject, role, permission# 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?