github.com/safedep/dry@v0.0.0-20241016050132-a15651f0548b/apiguard/tykgen/docs/OASAPIsApi.md (about) 1 # {{classname}} 2 3 All URIs are relative to *http://localhost/* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateApiOAS**](OASAPIsApi.md#CreateApiOAS) | **Post** /tyk/apis/oas | 8 [**DeleteOASApi**](OASAPIsApi.md#DeleteOASApi) | **Delete** /tyk/apis/oas/{apiID} | 9 [**DownloadApiOASPublic**](OASAPIsApi.md#DownloadApiOASPublic) | **Get** /tyk/apis/oas/{apiID}/export | 10 [**DownloadApisOASPublic**](OASAPIsApi.md#DownloadApisOASPublic) | **Get** /tyk/apis/oas/export | 11 [**ImportOAS**](OASAPIsApi.md#ImportOAS) | **Post** /tyk/apis/oas/import | 12 [**ListApiOAS**](OASAPIsApi.md#ListApiOAS) | **Get** /tyk/apis/oas/{apiID} | 13 [**ListApisOAS**](OASAPIsApi.md#ListApisOAS) | **Get** /tyk/apis/oas | 14 [**ListOASApiVersions**](OASAPIsApi.md#ListOASApiVersions) | **Get** /tyk/apis/oas/{apiID}/versions | 15 [**PatchApiOAS**](OASAPIsApi.md#PatchApiOAS) | **Patch** /tyk/apis/oas/{apiID} | Patch a single OAS API by ID 16 [**UpdateApiOAS**](OASAPIsApi.md#UpdateApiOAS) | **Put** /tyk/apis/oas/{apiID} | 17 18 # **CreateApiOAS** 19 > ApiModifyKeySuccess CreateApiOAS(ctx, optional) 20 21 22 Create API with OAS format A single Tyk node can have its API Definitions queried, deleted and updated remotely. This functionality enables you to remotely update your Tyk definitions without having to manage the files manually. 23 24 ### Required Parameters 25 26 Name | Type | Description | Notes 27 ------------- | ------------- | ------------- | ------------- 28 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 29 **optional** | ***OASAPIsApiCreateApiOASOpts** | optional parameters | nil if no parameters 30 31 ### Optional Parameters 32 Optional parameters are passed through a pointer to a OASAPIsApiCreateApiOASOpts struct 33 Name | Type | Description | Notes 34 ------------- | ------------- | ------------- | ------------- 35 **body** | [**optional.Interface of Schema**](Schema.md)| | 36 **baseApiId** | **optional.**| The base API which the new version will be linked to. | 37 **baseApiVersionName** | **optional.**| The version name of the base API while creating the first version. This doesn't have to be sent for the next versions but if it is set, it will override base API version name. | 38 **newVersionName** | **optional.**| The version name of the created version. | 39 **setDefault** | **optional.**| If true, the new version is set as default version. | 40 41 ### Return type 42 43 [**ApiModifyKeySuccess**](apiModifyKeySuccess.md) 44 45 ### Authorization 46 47 [api_key](../README.md#api_key) 48 49 ### HTTP request headers 50 51 - **Content-Type**: application/json 52 - **Accept**: application/json 53 54 [[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) 55 56 # **DeleteOASApi** 57 > ApiStatusMessage DeleteOASApi(ctx, apiID) 58 59 60 Deleting an API definition will remove the file from the file store, the API definition will NOT be unloaded, a separate reload request will need to be made to disable the API endpoint. 61 62 ### Required Parameters 63 64 Name | Type | Description | Notes 65 ------------- | ------------- | ------------- | ------------- 66 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 67 **apiID** | **string**| The API ID | 68 69 ### Return type 70 71 [**ApiStatusMessage**](apiStatusMessage.md) 72 73 ### Authorization 74 75 [api_key](../README.md#api_key) 76 77 ### HTTP request headers 78 79 - **Content-Type**: Not defined 80 - **Accept**: application/json 81 82 [[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) 83 84 # **DownloadApiOASPublic** 85 > OasSchemaResponse DownloadApiOASPublic(ctx, apiID, optional) 86 87 88 Download all OAS format APIs, when used without the Tyk Dashboard. 89 90 ### Required Parameters 91 92 Name | Type | Description | Notes 93 ------------- | ------------- | ------------- | ------------- 94 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 95 **apiID** | **string**| The API ID | 96 **optional** | ***OASAPIsApiDownloadApiOASPublicOpts** | optional parameters | nil if no parameters 97 98 ### Optional Parameters 99 Optional parameters are passed through a pointer to a OASAPIsApiDownloadApiOASPublicOpts struct 100 Name | Type | Description | Notes 101 ------------- | ------------- | ------------- | ------------- 102 103 **mode** | **optional.String**| Mode of OAS export, by default mode could be empty which means to export OAS spec including OAS Tyk extension. When mode=public, OAS spec excluding Tyk extension is exported | 104 105 ### Return type 106 107 [**OasSchemaResponse**](OASSchemaResponse.md) 108 109 ### Authorization 110 111 [api_key](../README.md#api_key) 112 113 ### HTTP request headers 114 115 - **Content-Type**: Not defined 116 - **Accept**: application/json 117 118 [[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) 119 120 # **DownloadApisOASPublic** 121 > []OasSchemaResponse DownloadApisOASPublic(ctx, optional) 122 123 124 Download all OAS format APIs, when used without the Tyk Dashboard. 125 126 ### Required Parameters 127 128 Name | Type | Description | Notes 129 ------------- | ------------- | ------------- | ------------- 130 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 131 **optional** | ***OASAPIsApiDownloadApisOASPublicOpts** | optional parameters | nil if no parameters 132 133 ### Optional Parameters 134 Optional parameters are passed through a pointer to a OASAPIsApiDownloadApisOASPublicOpts struct 135 Name | Type | Description | Notes 136 ------------- | ------------- | ------------- | ------------- 137 **mode** | **optional.String**| The mode of OAS export. By default the mode is not set which means the OAS spec is exported including the OAS Tyk extension. If the mode is set to public, the OAS spec excluding the Tyk extension is exported. | 138 139 ### Return type 140 141 [**[]OasSchemaResponse**](OASSchemaResponse.md) 142 143 ### Authorization 144 145 [api_key](../README.md#api_key) 146 147 ### HTTP request headers 148 149 - **Content-Type**: Not defined 150 - **Accept**: application/json 151 152 [[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) 153 154 # **ImportOAS** 155 > ApiModifyKeySuccess ImportOAS(ctx, optional) 156 157 158 Create a new OAS format API, without x-tyk-gateway. For use with an existing OAS API that you want to expose via your Tyk Gateway. (New) 159 160 ### Required Parameters 161 162 Name | Type | Description | Notes 163 ------------- | ------------- | ------------- | ------------- 164 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 165 **optional** | ***OASAPIsApiImportOASOpts** | optional parameters | nil if no parameters 166 167 ### Optional Parameters 168 Optional parameters are passed through a pointer to a OASAPIsApiImportOASOpts struct 169 Name | Type | Description | Notes 170 ------------- | ------------- | ------------- | ------------- 171 **body** | [**optional.Interface of Schema**](Schema.md)| | 172 **upstreamURL** | **optional.**| Upstream URL for the API | 173 **listenPath** | **optional.**| Listen path for the API | 174 **customDomain** | **optional.**| Custom domain for the API | 175 **apiID** | **optional.**| ID of the API | 176 **allowList** | [**optional.Interface of BooleanQueryParam**](.md)| Enable allowList middleware for all endpoints | 177 **mockResponse** | [**optional.Interface of BooleanQueryParam**](.md)| Enable mockResponse middleware for all endpoints having responses configured. | 178 **validateRequest** | [**optional.Interface of BooleanQueryParam**](.md)| Enable validateRequest middleware for all endpoints having a request body with media type application/json | 179 **authentication** | [**optional.Interface of BooleanQueryParam**](.md)| Enable or disable authentication in your Tyk Gateway as per your OAS document. | 180 181 ### Return type 182 183 [**ApiModifyKeySuccess**](apiModifyKeySuccess.md) 184 185 ### Authorization 186 187 [api_key](../README.md#api_key) 188 189 ### HTTP request headers 190 191 - **Content-Type**: application/json 192 - **Accept**: application/json 193 194 [[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) 195 196 # **ListApiOAS** 197 > OasSchemaResponse ListApiOAS(ctx, apiID, optional) 198 199 200 Get API definition in OAS format Only if used without the Tyk Dashboard 201 202 ### Required Parameters 203 204 Name | Type | Description | Notes 205 ------------- | ------------- | ------------- | ------------- 206 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 207 **apiID** | **string**| The API ID | 208 **optional** | ***OASAPIsApiListApiOASOpts** | optional parameters | nil if no parameters 209 210 ### Optional Parameters 211 Optional parameters are passed through a pointer to a OASAPIsApiListApiOASOpts struct 212 Name | Type | Description | Notes 213 ------------- | ------------- | ------------- | ------------- 214 215 **mode** | **optional.String**| Mode of OAS get, by default mode could be empty which means to get OAS spec including OAS Tyk extension. When mode=public, OAS spec excluding Tyk extension will be returned in the response | 216 217 ### Return type 218 219 [**OasSchemaResponse**](OASSchemaResponse.md) 220 221 ### Authorization 222 223 [api_key](../README.md#api_key) 224 225 ### HTTP request headers 226 227 - **Content-Type**: Not defined 228 - **Accept**: application/json 229 230 [[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) 231 232 # **ListApisOAS** 233 > []OasSchemaResponse ListApisOAS(ctx, optional) 234 235 236 List all OAS format APIs, when used without the Tyk Dashboard. 237 238 ### Required Parameters 239 240 Name | Type | Description | Notes 241 ------------- | ------------- | ------------- | ------------- 242 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 243 **optional** | ***OASAPIsApiListApisOASOpts** | optional parameters | nil if no parameters 244 245 ### Optional Parameters 246 Optional parameters are passed through a pointer to a OASAPIsApiListApisOASOpts struct 247 Name | Type | Description | Notes 248 ------------- | ------------- | ------------- | ------------- 249 **mode** | **optional.String**| Mode of OAS get, by default mode could be empty which means to get OAS spec including OAS Tyk extension. When mode=public, OAS spec excluding Tyk extension will be returned in the response | 250 251 ### Return type 252 253 [**[]OasSchemaResponse**](OASSchemaResponse.md) 254 255 ### Authorization 256 257 [api_key](../README.md#api_key) 258 259 ### HTTP request headers 260 261 - **Content-Type**: Not defined 262 - **Accept**: application/json 263 264 [[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) 265 266 # **ListOASApiVersions** 267 > InlineResponse200 ListOASApiVersions(ctx, apiID, optional) 268 269 270 Listing versions of an OAS API 271 272 ### Required Parameters 273 274 Name | Type | Description | Notes 275 ------------- | ------------- | ------------- | ------------- 276 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 277 **apiID** | **string**| The API ID | 278 **optional** | ***OASAPIsApiListOASApiVersionsOpts** | optional parameters | nil if no parameters 279 280 ### Optional Parameters 281 Optional parameters are passed through a pointer to a OASAPIsApiListOASApiVersionsOpts struct 282 Name | Type | Description | Notes 283 ------------- | ------------- | ------------- | ------------- 284 285 **searchText** | **optional.String**| Search for API version name | 286 **accessType** | **optional.String**| Filter for internal or external API versions | 287 288 ### Return type 289 290 [**InlineResponse200**](inline_response_200.md) 291 292 ### Authorization 293 294 [api_key](../README.md#api_key) 295 296 ### HTTP request headers 297 298 - **Content-Type**: Not defined 299 - **Accept**: application/json 300 301 [[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) 302 303 # **PatchApiOAS** 304 > ApiModifyKeySuccess PatchApiOAS(ctx, apiID, optional) 305 Patch a single OAS API by ID 306 307 Update API with OAS format. You can use this endpoint to update OAS part of the tyk API definition. This endpoint allows you to configure tyk OAS extension based on query params provided(similar to import) 308 309 ### Required Parameters 310 311 Name | Type | Description | Notes 312 ------------- | ------------- | ------------- | ------------- 313 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 314 **apiID** | **string**| The API ID | 315 **optional** | ***OASAPIsApiPatchApiOASOpts** | optional parameters | nil if no parameters 316 317 ### Optional Parameters 318 Optional parameters are passed through a pointer to a OASAPIsApiPatchApiOASOpts struct 319 Name | Type | Description | Notes 320 ------------- | ------------- | ------------- | ------------- 321 322 **body** | [**optional.Interface of Schema**](Schema.md)| | 323 **upstreamURL** | **optional.**| Upstream URL for the API | 324 **listenPath** | **optional.**| Listen path for the API | 325 **customDomain** | **optional.**| Custom domain for the API | 326 **validateRequest** | [**optional.Interface of BooleanQueryParam**](.md)| Enable validateRequest middleware for all endpoints having a request body with media type application/json | 327 **allowList** | [**optional.Interface of BooleanQueryParam**](.md)| Enable allowList middleware for all endpoints | 328 **mockResponse** | [**optional.Interface of BooleanQueryParam**](.md)| Enable mockResponse middleware for all endpoints having responses configured. | 329 **authentication** | [**optional.Interface of BooleanQueryParam**](.md)| Enable or disable authentication in your Tyk Gateway as per your OAS document. | 330 331 ### Return type 332 333 [**ApiModifyKeySuccess**](apiModifyKeySuccess.md) 334 335 ### Authorization 336 337 [api_key](../README.md#api_key) 338 339 ### HTTP request headers 340 341 - **Content-Type**: application/json 342 - **Accept**: application/json 343 344 [[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) 345 346 # **UpdateApiOAS** 347 > ApiModifyKeySuccess UpdateApiOAS(ctx, apiID, optional) 348 349 350 Updating an API definition uses the same signature an object as a `POST`, however it will first ensure that the API ID that is being updated is the same as the one in the object being `PUT`. Updating will completely replace the file descriptor and will not change an API Definition that has already been loaded, the hot-reload endpoint will need to be called to push the new definition to live. 351 352 ### Required Parameters 353 354 Name | Type | Description | Notes 355 ------------- | ------------- | ------------- | ------------- 356 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 357 **apiID** | **string**| The API ID | 358 **optional** | ***OASAPIsApiUpdateApiOASOpts** | optional parameters | nil if no parameters 359 360 ### Optional Parameters 361 Optional parameters are passed through a pointer to a OASAPIsApiUpdateApiOASOpts struct 362 Name | Type | Description | Notes 363 ------------- | ------------- | ------------- | ------------- 364 365 **body** | [**optional.Interface of Schema**](Schema.md)| | 366 367 ### Return type 368 369 [**ApiModifyKeySuccess**](apiModifyKeySuccess.md) 370 371 ### Authorization 372 373 [api_key](../README.md#api_key) 374 375 ### HTTP request headers 376 377 - **Content-Type**: application/json 378 - **Accept**: application/json 379 380 [[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) 381