1
+ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2
+
1
3
import requests as requests_http
2
4
from . import utils
3
5
from speakeasy .models import operations , shared
4
6
from typing import Optional
5
7
6
8
class APIEndpoints :
9
+ r"""REST APIs for managing ApiEndpoint entities"""
7
10
_client : requests_http .Session
8
11
_security_client : requests_http .Session
9
12
_server_url : str
@@ -23,7 +26,6 @@ def delete_api_endpoint(self, request: operations.DeleteAPIEndpointRequest) -> o
23
26
r"""Delete an ApiEndpoint.
24
27
Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore).
25
28
"""
26
-
27
29
base_url = self ._server_url
28
30
29
31
url = utils .generate_url (operations .DeleteAPIEndpointRequest , base_url , '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}' , request )
@@ -52,7 +54,6 @@ def find_api_endpoint(self, request: operations.FindAPIEndpointRequest) -> opera
52
54
Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema).
53
55
This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID} endpoints.
54
56
"""
55
-
56
57
base_url = self ._server_url
57
58
58
59
url = utils .generate_url (operations .FindAPIEndpointRequest , base_url , '/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}' , request )
@@ -83,7 +84,6 @@ def generate_open_api_spec_for_api_endpoint(self, request: operations.GenerateOp
83
84
This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document.
84
85
Returns the original document and the newly generated document allowing a diff to be performed to see what has changed.
85
86
"""
86
-
87
87
base_url = self ._server_url
88
88
89
89
url = utils .generate_url (operations .GenerateOpenAPISpecForAPIEndpointRequest , base_url , '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi' , request )
@@ -113,7 +113,6 @@ def generate_postman_collection_for_api_endpoint(self, request: operations.Gener
113
113
r"""Generate a Postman collection for a particular ApiEndpoint.
114
114
Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document.
115
115
"""
116
-
117
116
base_url = self ._server_url
118
117
119
118
url = utils .generate_url (operations .GeneratePostmanCollectionForAPIEndpointRequest , base_url , '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman' , request )
@@ -139,9 +138,7 @@ def generate_postman_collection_for_api_endpoint(self, request: operations.Gener
139
138
return res
140
139
141
140
def get_all_api_endpoints (self , request : operations .GetAllAPIEndpointsRequest ) -> operations .GetAllAPIEndpointsResponse :
142
- r"""Get all Api endpoints for a particular apiID.
143
- """
144
-
141
+ r"""Get all Api endpoints for a particular apiID."""
145
142
base_url = self ._server_url
146
143
147
144
url = utils .generate_url (operations .GetAllAPIEndpointsRequest , base_url , '/v1/apis/{apiID}/api_endpoints' , request )
@@ -168,9 +165,7 @@ def get_all_api_endpoints(self, request: operations.GetAllAPIEndpointsRequest) -
168
165
return res
169
166
170
167
def get_all_for_version_api_endpoints (self , request : operations .GetAllForVersionAPIEndpointsRequest ) -> operations .GetAllForVersionAPIEndpointsResponse :
171
- r"""Get all ApiEndpoints for a particular apiID and versionID.
172
- """
173
-
168
+ r"""Get all ApiEndpoints for a particular apiID and versionID."""
174
169
base_url = self ._server_url
175
170
176
171
url = utils .generate_url (operations .GetAllForVersionAPIEndpointsRequest , base_url , '/v1/apis/{apiID}/version/{versionID}/api_endpoints' , request )
@@ -197,9 +192,7 @@ def get_all_for_version_api_endpoints(self, request: operations.GetAllForVersion
197
192
return res
198
193
199
194
def get_api_endpoint (self , request : operations .GetAPIEndpointRequest ) -> operations .GetAPIEndpointResponse :
200
- r"""Get an ApiEndpoint.
201
- """
202
-
195
+ r"""Get an ApiEndpoint."""
203
196
base_url = self ._server_url
204
197
205
198
url = utils .generate_url (operations .GetAPIEndpointRequest , base_url , '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}' , request )
@@ -229,7 +222,6 @@ def upsert_api_endpoint(self, request: operations.UpsertAPIEndpointRequest) -> o
229
222
r"""Upsert an ApiEndpoint.
230
223
Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated.
231
224
"""
232
-
233
225
base_url = self ._server_url
234
226
235
227
url = utils .generate_url (operations .UpsertAPIEndpointRequest , base_url , '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}' , request )
0 commit comments