bito-code-review[bot] commented on code in PR #37434:
URL: https://github.com/apache/superset/pull/37434#discussion_r2734382815
##########
docs/docs/api.mdx:
##########
@@ -1,40 +1,590 @@
---
-title: API
+title: API Reference
hide_title: true
sidebar_position: 10
---
-import SwaggerUI from 'swagger-ui-react';
-import openapi from '/resources/openapi.json';
-import 'swagger-ui-react/swagger-ui.css';
import { Alert } from 'antd';
-## API
+## REST API Reference
-Superset's public **REST API** follows the
-[OpenAPI specification](https://swagger.io/specification/), and is
-documented here. The docs below are generated using
-[Swagger React UI](https://www.npmjs.com/package/swagger-ui-react).
-
-:::resources
-- [Blog: The Superset REST
API](https://preset.io/blog/2020-10-01-superset-api/)
-- [Blog: Accessing APIs with
Superset](https://preset.io/blog/accessing-apis-with-superset/)
-:::
+Superset exposes a comprehensive **REST API** that follows the [OpenAPI
specification](https://swagger.io/specification/).
+You can use this API to programmatically interact with Superset for
automation, integrations, and custom applications.
<Alert
type="info"
- message={
- <div>
- <strong>NOTE! </strong>
- You can find an interactive version of this documentation on your local
Superset
- instance at <strong>/swagger/v1</strong> (unless disabled)
- </div>
+ showIcon
+ message="Code Samples & Schema Documentation"
+ description={
+ <span>
+ Each endpoint includes ready-to-use code samples in
<strong>cURL</strong>, <strong>Python</strong>, and <strong>JavaScript</strong>.
+ Browse the <a href="./schemas">Schema definitions</a> for detailed data
model documentation.
+ </span>
}
+ style={{ marginBottom: '24px' }}
/>
-<br />
-<br />
-<hr />
-<div className="swagger-container">
- <SwaggerUI spec={openapi} />
-</div>
+---
+
+### Authentication
+
+Most API endpoints require authentication via JWT tokens.
+
+#### Quick Start
+
+```bash
+# 1. Get a JWT token
+curl -X POST http://localhost:8088/api/v1/security/login \
+ -H "Content-Type: application/json" \
+ -d '{"username": "admin", "password": "admin", "provider": "db"}'
+
+# 2. Use the access_token from the response
+curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
+ http://localhost:8088/api/v1/dashboard/
+```
+
+#### Security Endpoints
+
+| Method | Endpoint | Description |
+|--------|----------|-------------|
+| `GET` | [Get the CSRF token](./get-the-csrf-token) |
`/api/v1/security/csrf_token/` |
Review Comment:
<!-- Bito Reply -->
Your explanation is accurate. The links in `docs/docs/api.mdx` now use
`./api/${slug}` format, which Docusaurus resolves file-relative from
`docs/api.mdx` to `docs/api/${slug}.api.mdx`. The build confirming zero broken
links supports this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]