(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.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.requests.generateRequestPostmanCollection({
requestID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GenerateRequestPostmanCollectionRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GenerateRequestPostmanCollectionResponse>
Get information about a particular request.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.requests.getRequestFromEventLog({
requestID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetRequestFromEventLogRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetRequestFromEventLogResponse>
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.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.requests.queryEventLog({
filters: {
filters: [
{
key: "<key>",
operator: "string",
value: "string",
},
],
limit: 241978,
offset: 451388,
operator: "string",
},
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.QueryEventLogRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.QueryEventLogResponse>