# API Contracts: Migration Dashboard Grid ## Endpoints ### GET /api/migration/dashboards Fetch a list of dashboards from the specified source environment. **Request:** - **Headers**: - `x-source-env-id`: `string` (UUID of the source environment configuration) **Response:** - **Status**: `200 OK` - **Body**: `List[Dashboard]` ```json [ { "id": 101, "title": "Sales Overview", "changed_on": "2023-10-27T14:30:00Z", "published": true, "url": "/superset/dashboard/sales-overview/" }, { "id": 102, "title": "Marketing Draft", "changed_on": "2023-10-26T09:15:00Z", "published": false, "url": "/superset/dashboard/marketing-draft/" } ] ``` **Errors:** - `400 Bad Request`: Missing environment ID header. - `404 Not Found`: Environment configuration not found. - `502 Bad Gateway`: Error communicating with Superset. ## Python Definitions ```python # [DEF:backend.src.api.routes.migration.get_dashboards:Function] # @PURPOSE: Fetch dashboards from the specified source environment. # @PRE: Header 'x-source-env-id' must be a valid environment UUID. # @POST: Returns a list of Dashboard models with id, title, changed_on, and published status. # @PARAM: source_env_id (str) - UUID of the source environment. # @RETURN: List[DashboardModel]