Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Requests

(requests)

Overview

REST APIs for retrieving request information

Available Operations

generateRequestPostmanCollection

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

import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";

async function run() {
  const sdk = new Speakeasy({
    security: {
      apiKey: "<YOUR_API_KEY_HERE>",
    },
    workspaceID: "<value>",
  });

  const res = await sdk.requests.generateRequestPostmanCollection({
    requestID: "<value>",
  });

  if (res.statusCode == 200) {
    // handle response
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GenerateRequestPostmanCollectionRequest ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.GenerateRequestPostmanCollectionResponse>

Errors

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

getRequestFromEventLog

Get information about a particular request.

Example Usage

import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";

async function run() {
  const sdk = new Speakeasy({
    security: {
      apiKey: "<YOUR_API_KEY_HERE>",
    },
    workspaceID: "<value>",
  });

  const res = await sdk.requests.getRequestFromEventLog({
    requestID: "<value>",
  });

  if (res.statusCode == 200) {
    // handle response
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetRequestFromEventLogRequest ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.GetRequestFromEventLogResponse>

Errors

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

queryEventLog

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

import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";

async function run() {
  const sdk = new Speakeasy({
    security: {
      apiKey: "<YOUR_API_KEY_HERE>",
    },
    workspaceID: "<value>",
  });

  const res = await sdk.requests.queryEventLog({
    filters: {
      filters: [
        {
          key: "<key>",
          operator: "<value>",
          value: "<value>",
        },
      ],
      limit: 241978,
      offset: 451388,
      operator: "<value>",
    },
  });

  if (res.statusCode == 200) {
    // handle response
  }
}

run();

Parameters

Parameter Type Required Description
request operations.QueryEventLogRequest ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.QueryEventLogResponse>

Errors

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