Skip to content

Latest commit

 

History

History
99 lines (67 loc) · 4.45 KB

File metadata and controls

99 lines (67 loc) · 4.45 KB

Auth

(auth)

Overview

REST APIs for managing Authentication

Available Operations

getWorkspaceAccess

Checks if generation is permitted for a particular run of the CLI

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.auth.getWorkspaceAccess({});

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

run();

Parameters

Parameter Type Required Description
request operations.GetWorkspaceAccessRequest ✔️ The request object to use for the request.
retries utils.RetryConfig Configuration to override the default retry behavior of the client.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.GetWorkspaceAccessResponse>

Errors

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

validateApiKey

Validate the current api key.

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.auth.validateApiKey();

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

run();

Parameters

Parameter Type Required Description
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.ValidateApiKeyResponse>

Errors

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