{"openapi":"3.1.0","info":{"title":"GET /api/v1/businesses/user-preferences/table-views/{table_key}","version":"1.0.0","description":"Get saved views for one table"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/businesses/user-preferences/table-views/{table_key}":{"get":{"tags":["businesses"],"summary":"Get saved views for one table","description":"Return the saved-views blob for a single DataTable persistKey.","operationId":"get_table_views_api_v1_businesses_user_preferences_table_views__table_key__get","parameters":[{"name":"table_key","in":"path","required":true,"schema":{"type":"string","title":"Table Key"}},{"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/SuccessEnvelope_TableSavedViewsDataSchema_"}}}},"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":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_TableSavedViewsDataSchema_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/TableSavedViewsDataSchema"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[TableSavedViewsDataSchema]"},"TableSavedViewSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"createdAt":{"type":"string","title":"Createdat","default":""},"updatedAt":{"type":"string","title":"Updatedat","default":""},"state":{"$ref":"#/components/schemas/TableSavedViewStateSchema"}},"type":"object","required":["id","name"],"title":"TableSavedViewSchema"},"TableSavedViewStateSchema":{"properties":{"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters"},"sort":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sort"},"columns":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Columns"}},"type":"object","title":"TableSavedViewStateSchema","description":"Filter/sort/column snapshot for one saved view."},"TableSavedViewsDataSchema":{"properties":{"v":{"type":"integer","title":"V","description":"Schema version","default":1},"views":{"items":{"$ref":"#/components/schemas/TableSavedViewSchema"},"type":"array","title":"Views"},"defaultViewId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultviewid","description":"Auto-applied view id on load"}},"type":"object","title":"TableSavedViewsDataSchema","description":"Saved views blob for a single DataTable ``persistKey``."},"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":[]}]}