(requests)
REST APIs for retrieving request information
- generate_request_postman_collection - Generate a Postman collection for a particular request.
- get_request_from_event_log - Get information about a particular request.
- query_event_log - Query the event log to retrieve a list of requests.
Generates a Postman collection for a particular request. Allowing it to be replayed with the same inputs that were captured by the SDK.
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.requests.generate_request_postman_collection(request={
"request_id": "<value>",
})
if res.postman_collection is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GenerateRequestPostmanCollectionRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GenerateRequestPostmanCollectionResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Get information about a particular request.
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.requests.get_request_from_event_log(request={
"request_id": "<value>",
})
if res.unbounded_request is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetRequestFromEventLogRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetRequestFromEventLogResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Supports retrieving a list of request captured by the SDK for this workspace. Allows the filtering of requests on a number of criteria such as ApiID, VersionID, Path, Method, etc.
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.requests.query_event_log()
if res.bounded_requests is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.QueryEventLogRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.QueryEventLogResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |