refactor complete
This commit is contained in:
39
specs/012-remove-superset-tool/contracts/api.md
Normal file
39
specs/012-remove-superset-tool/contracts/api.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# API Contracts: 012-remove-superset-tool
|
||||
|
||||
## SupersetClient Internal API
|
||||
|
||||
The `SupersetClient` will provide the following methods for internal backend use:
|
||||
|
||||
### `get_dashboards(query: Optional[Dict] = None) -> Tuple[int, List[Dict]]`
|
||||
- **Purpose**: Fetches paginated dashboards.
|
||||
- **Contract**:
|
||||
- `query`: Optional filters and pagination parameters.
|
||||
- Returns: `(total_count, dashboard_list)`.
|
||||
|
||||
### `export_dashboard(dashboard_id: int) -> Tuple[bytes, str]`
|
||||
- **Purpose**: Exports a dashboard as a ZIP file.
|
||||
- **Contract**:
|
||||
- `dashboard_id`: ID of the dashboard.
|
||||
- Returns: `(zip_content, filename)`.
|
||||
|
||||
### `import_dashboard(file_name: Union[str, Path], dash_id: Optional[int] = None, dash_slug: Optional[str] = None) -> Dict`
|
||||
- **Purpose**: Imports a dashboard from a ZIP file.
|
||||
- **Contract**:
|
||||
- `file_name`: Path to ZIP.
|
||||
- `dash_id`/`dash_slug`: Optional identifiers for delete-retry logic.
|
||||
- Returns: API response dictionary.
|
||||
|
||||
## Configuration Models (Pydantic)
|
||||
|
||||
### `Environment`
|
||||
```python
|
||||
class Environment(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
url: str
|
||||
username: str
|
||||
password: str
|
||||
verify_ssl: bool = True
|
||||
timeout: int = 30
|
||||
is_default: bool = False
|
||||
backup_schedule: Schedule = Field(default_factory=Schedule)
|
||||
Reference in New Issue
Block a user