(api_endpoints)
REST APIs for managing ApiEndpoint entities
- delete_api_endpoint - Delete an ApiEndpoint.
- find_api_endpoint - Find an ApiEndpoint via its displayName.
- generate_open_api_spec_for_api_endpoint - Generate an OpenAPI specification for a particular ApiEndpoint.
- generate_postman_collection_for_api_endpoint - Generate a Postman collection for a particular ApiEndpoint.
- get_all_api_endpoints - Get all Api endpoints for a particular apiID.
- get_all_for_version_api_endpoints - Get all ApiEndpoints for a particular apiID and versionID.
- get_api_endpoint - Get an ApiEndpoint.
- upsert_api_endpoint - Upsert an ApiEndpoint.
Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore).
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.delete_api_endpoint(request={
"api_id": "<value>",
"version_id": "<value>",
"api_endpoint_id": "<value>",
})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteAPIEndpointRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.DeleteAPIEndpointResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema). This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID} endpoints.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.find_api_endpoint(request={
"api_id": "<value>",
"version_id": "<value>",
"display_name": "Don.Strosin",
})
if res.api_endpoint is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FindAPIEndpointRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.FindAPIEndpointResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document. Returns the original document and the newly generated document allowing a diff to be performed to see what has changed.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.generate_open_api_spec_for_api_endpoint(request={
"api_id": "<value>",
"version_id": "<value>",
"api_endpoint_id": "<value>",
})
if res.generate_open_api_spec_diff is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GenerateOpenAPISpecForAPIEndpointRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GenerateOpenAPISpecForAPIEndpointResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
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.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.generate_postman_collection_for_api_endpoint(request={
"api_id": "<value>",
"version_id": "<value>",
"api_endpoint_id": "<value>",
})
if res.postman_collection is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GeneratePostmanCollectionForAPIEndpointRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GeneratePostmanCollectionForAPIEndpointResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Get all Api endpoints for a particular apiID.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.get_all_api_endpoints(request={
"api_id": "<value>",
})
if res.api_endpoints is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetAllAPIEndpointsRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetAllAPIEndpointsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Get all ApiEndpoints for a particular apiID and versionID.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.get_all_for_version_api_endpoints(request={
"api_id": "<value>",
"version_id": "<value>",
})
if res.api_endpoints is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetAllForVersionAPIEndpointsRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetAllForVersionAPIEndpointsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Get an ApiEndpoint.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.get_api_endpoint(request={
"api_id": "<value>",
"version_id": "<value>",
"api_endpoint_id": "<value>",
})
if res.api_endpoint is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetAPIEndpointRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetAPIEndpointResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated.
from speakeasy_client_sdk_python import Speakeasy
from speakeasy_client_sdk_python.models import shared
s = Speakeasy(
security=shared.Security(
api_key="<YOUR_API_KEY_HERE>",
),
)
res = s.api_endpoints.upsert_api_endpoint(request={
"api_id": "<value>",
"version_id": "<value>",
"api_endpoint_id": "<value>",
"api_endpoint": {
"api_endpoint_id": "<value>",
"description": "Public-key systematic attitude",
"display_name": "Camille.Schaefer11",
"method": "<value>",
"path": "/Library",
"version_id": "<value>",
},
})
if res.api_endpoint is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.UpsertAPIEndpointRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.UpsertAPIEndpointResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |