(requests)
REST APIs for retrieving request information
- generateRequestPostmanCollection - Generate a Postman collection for a particular request.
- getRequestFromEventLog - Get information about a particular request.
- queryEventLog - 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.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\GenerateRequestPostmanCollectionRequest(
requestID: '<id>',
);
$response = $sdk->requests->generateRequestPostmanCollection(
request: $request
);
if ($response->postmanCollection !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GenerateRequestPostmanCollectionRequest | ✔️ | The request object to use for the request. |
?Operations\GenerateRequestPostmanCollectionResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
Get information about a particular request.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\GetRequestFromEventLogRequest(
requestID: '<id>',
);
$response = $sdk->requests->getRequestFromEventLog(
request: $request
);
if ($response->unboundedRequest !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetRequestFromEventLogRequest | ✔️ | The request object to use for the request. |
?Operations\GetRequestFromEventLogResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 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.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\QueryEventLogRequest();
$response = $sdk->requests->queryEventLog(
request: $request
);
if ($response->boundedRequests !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\QueryEventLogRequest | ✔️ | The request object to use for the request. |
?Operations\QueryEventLogResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |