# \OpenapiApi
All URIs are relative to */api*
[**download_openapi_spec**](OpenapiApi.md#download_openapi_spec) | **POST** /w/{workspace}/openapi/download | Download the OpenAPI v3.1 spec as a file
[**generate_openapi_spec**](OpenapiApi.md#generate_openapi_spec) | **POST** /w/{workspace}/openapi/generate | generate openapi spec from http routes/webhook
## download_openapi_spec
> std::path::PathBuf download_openapi_spec(workspace, generate_openapi_spec)
Download the OpenAPI v3.1 spec as a file
### Parameters
**workspace** | **String** | | [required] |
**generate_openapi_spec** | Option<[**GenerateOpenapiSpec**](GenerateOpenapiSpec.md)> | openapi spec info and url | |
### Return type
[**std::path::PathBuf**](std::path::PathBuf.md)
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/octet-stream
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## generate_openapi_spec
> String generate_openapi_spec(workspace, generate_openapi_spec)
generate openapi spec from http routes/webhook
### Parameters
**workspace** | **String** | | [required] |
**generate_openapi_spec** | Option<[**GenerateOpenapiSpec**](GenerateOpenapiSpec.md)> | openapi spec info and url | |
### Return type
**String**
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: text/plain
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)