{"openapi":"3.1.0","info":{"title":"GET /api/v1/entity-tags/{model_type}/{model_id}","version":"1.0.0","description":"Get tags for an entity"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/entity-tags/{model_type}/{model_id}":{"get":{"tags":["tags"],"summary":"Get tags for an entity","description":"Retrieve all tags attached to a specific entity with cursor-based pagination","operationId":"get_entity_tags_api_v1_entity_tags__model_type___model_id__get","parameters":[{"name":"model_type","in":"path","required":true,"schema":{"type":"string","title":"Model Type"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination","title":"Cursor"},"description":"Cursor for pagination"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Pagination limit","title":"Limit"},"description":"Pagination limit"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","description":"Pagination direction: 'next' or 'prev'","default":"next","title":"Direction"},"description":"Pagination direction: 'next' or 'prev'"},{"name":"include_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include total count (expensive - avoid if possible)","default":false,"title":"Include Total Count"},"description":"Whether to include total count (expensive - avoid if possible)"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.","title":"Sort By"},"description":"Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None."},{"name":"descending","in":"query","required":false,"schema":{"type":"boolean","description":"Sort direction: true for descending (newest/largest first), false for ascending","default":true,"title":"Descending"},"description":"Sort direction: true for descending (newest/largest first), false for ascending"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityTagListResponse"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"EntityTagListResponse":{"properties":{"entity_tags":{"items":{"$ref":"#/components/schemas/EntityTagResponse"},"type":"array","title":"Entity Tags","description":"List of entity tags"},"count":{"type":"integer","title":"Count","description":"Total number of entity tags"}},"type":"object","required":["count"],"title":"EntityTagListResponse","description":"Schema for listing entity tags."},"EntityTagResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the entity tag"},"tag_id":{"type":"string","title":"Tag Id","description":"UUID of the tag"},"tag_name":{"type":"string","title":"Tag Name","description":"Name of the tag"},"tag_group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag Group Name","description":"Name of the tag group (if any)"},"model_type":{"type":"string","title":"Model Type","description":"Type of entity this tag is attached to"},"model_id":{"type":"string","title":"Model Id","description":"UUID of the entity"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the tag was attached"}},"type":"object","required":["id","tag_id","tag_name","model_type","model_id","created_at"],"title":"EntityTagResponse","description":"Schema for entity tag response."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}