REST /api/v1/tab-states 8 endpoints
GET /api/v1/tab-states/api/v1/tab-states

List all saved tab states

Public

Response Example

{
  "data": [
    {
      "id": "ts-001",
      "tab_index": 0,
      "route_state": {
        "route_name": "HomeScreen",
        "params": {}
      },
      "created_at": "2026-03-20T10:00:00Z",
      "updated_at": "2026-03-25T14:22:00Z"
    },
    {
      "id": "ts-002",
      "tab_index": 2,
      "route_state": {
        "route_name": "ProfileScreen",
        "params": {
          "user_id": "u-42"
        }
      },
      "created_at": "2026-03-21T09:15:00Z",
      "updated_at": "2026-03-25T11:05:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2
  }
}
GET /api/v1/tab-states/api/v1/tab-states/:id

Get a specific tab state by ID

Public

Response Example

{
  "id": "ts-001",
  "tab_index": 0,
  "route_state": {
    "route_name": "HomeScreen",
    "params": {}
  },
  "created_at": "2026-03-20T10:00:00Z",
  "updated_at": "2026-03-25T14:22:00Z"
}
POST /api/v1/tab-states/api/v1/tab-states

Save a new tab state

Public

Request Example

{
  "tab_index": 1,
  "route_state": {
    "route_name": "SearchScreen",
    "params": {
      "query": "accessibility"
    }
  }
}

Response Example

{
  "id": "ts-003",
  "tab_index": 1,
  "route_state": {
    "route_name": "SearchScreen",
    "params": {
      "query": "accessibility"
    }
  },
  "created_at": "2026-03-26T08:00:00Z",
  "updated_at": "2026-03-26T08:00:00Z"
}
PUT /api/v1/tab-states/api/v1/tab-states/:id

Update an existing tab state

Public

Request Example

{
  "tab_index": 1,
  "route_state": {
    "route_name": "SearchScreen",
    "params": {
      "query": "gesture navigation"
    }
  }
}

Response Example

{
  "id": "ts-003",
  "tab_index": 1,
  "route_state": {
    "route_name": "SearchScreen",
    "params": {
      "query": "gesture navigation"
    }
  },
  "created_at": "2026-03-26T08:00:00Z",
  "updated_at": "2026-03-26T08:45:00Z"
}
DELETE /api/v1/tab-states/api/v1/tab-states/:id

Delete a tab state record

Public

Response Example

{
  "deleted": true,
  "id": "ts-003"
}
GET /api/v1/tab-states/api/v1/tab-states/current

Get the currently active tab index

Public

Response Example

{
  "tab_index": 2
}
PUT /api/v1/tab-states/api/v1/tab-states/current

Set the active tab index (setCurrentTabIndex)

Public

Request Example

{
  "tab_index": 3
}

Response Example

{
  "tab_index": 3,
  "updated_at": "2026-03-26T09:10:00Z"
}
POST /api/v1/tab-states/api/v1/tab-states/:id/restore

Restore a previously saved tab state (restoreTabState)

Public

Response Example

{
  "restored": true,
  "tab_index": 0,
  "route_state": {
    "route_name": "HomeScreen",
    "params": {}
  }
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}