{"openapi":"3.1.0","info":{"title":"GET /api/v1/businesses/user-preferences/table-views","version":"1.0.0","description":"List saved table views"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/businesses/user-preferences/table-views":{"get":{"tags":["businesses"],"summary":"List saved table views","description":"Return all DataTable saved views for the current user in the active business.","operationId":"list_table_views_api_v1_businesses_user_preferences_table_views_get","parameters":[{"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_TableViewsMapResponse_"}}}},"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_TableViewsMapResponse_":{"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/TableViewsMapResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[TableViewsMapResponse]"},"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``."},"TableViewsMapResponse":{"properties":{"tables":{"additionalProperties":{"$ref":"#/components/schemas/TableSavedViewsDataSchema"},"type":"object","title":"Tables","description":"Keyed by DataTable persistKey / tableKey"},"version":{"type":"integer","title":"Version","description":"Optimistic-concurrency version for this user+business prefs blob","default":0}},"type":"object","title":"TableViewsMapResponse","description":"All saved table views for the current user+business."},"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":[]}]}