Skip to content

Latest commit

 

History

History
144 lines (95 loc) · 7.8 KB

File metadata and controls

144 lines (95 loc) · 7.8 KB

Requests

(requests)

Overview

REST APIs for retrieving request information

Available Operations

generate_request_postman_collection

Generates a Postman collection for a particular request. Allowing it to be replayed with the same inputs that were captured by the SDK.

Example Usage

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

Parameters

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.

Response

operations.GenerateRequestPostmanCollectionResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

get_request_from_event_log

Get information about a particular request.

Example Usage

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

Parameters

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.

Response

operations.GetRequestFromEventLogResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

query_event_log

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.

Example Usage

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

Parameters

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.

Response

operations.QueryEventLogResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /