| --- |
| title: REST API |
| sidebar_position: 9 |
| --- |
| |
| <!-- To maintain consistent display, please remove the `info` and `host` content from the original `api.json` --> |
| |
| import { lazy, Suspense } from 'react' |
| import useIsBrowser from '@docusaurus/useIsBrowser'; |
| import 'swagger-ui-react/swagger-ui.css'; |
| |
| export function APIPage() { |
| const isBrowser = useIsBrowser(); |
| const LazySwaggerUI = lazy(() => import('swagger-ui-react')); |
| return isBrowser ? ( |
| <div> |
| <p>This file is generated by Swagger, and you can also access dashboard_address/inlong/manager/doc.html directly.</p> |
| <Suspense fallback="loading"> |
| <LazySwaggerUI url="https://inlong.apache.org/file/api.json" /> |
| </Suspense> |
| </div> |
| ) : 'Sorry, ssr is not currently supported.'; |
| } |
| |
| export default APIPage; |