Skip to content

Latest commit

 

History

History
1178 lines (880 loc) · 121 KB

README.md

File metadata and controls

1178 lines (880 loc) · 121 KB

SDK

Overview

Available Operations

getV1Liveness

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.getV1Liveness();

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1LivenessResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getV1KeysGetKey

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const keyId = "key_1234";
  
  const result = await sdk.getV1KeysGetKey(keyId);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
keyId string ✔️ N/A [object Object]
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1KeysGetKeyResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1KeysDeleteKey

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1KeysDeleteKey({
    keyId: "key_1234",
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1KeysDeleteKeyRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1KeysDeleteKeyResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1KeysCreateKey

Example Usage

import { SDK } from "openapi";
import { Interval, Type } from "openapi/models/operations";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1KeysCreateKey({
    apiId: "api_123",
    name: "my key",
    ownerId: "team_123",
    meta: {
      "billingTier": "PRO",
      "trialEnds": "2023-06-16T17:16:37.161Z",
    },
    expires: 1623869797161,
    remaining: 1000,
    refill: {
      interval: Interval.Daily,
      amount: 100,
    },
    ratelimit: {
      type: Type.Fast,
      limit: 10,
      refillRate: 1,
      refillInterval: 60,
    },
    enabled: false,
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1KeysCreateKeyRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1KeysCreateKeyResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1KeysVerifyKey

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1KeysVerifyKey({
    apiId: "api_1234",
    key: "sk_1234",
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1KeysVerifyKeyRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1KeysVerifyKeyResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1KeysUpdateKey

Example Usage

import { SDK } from "openapi";
import { PostV1KeysUpdateKeyInterval, PostV1KeysUpdateKeyType } from "openapi/models/operations";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1KeysUpdateKey({
    keyId: "key_123",
    name: "Customer X",
    ownerId: "user_123",
    meta: {
      "roles": "<value>",
      "stripeCustomerId": "cus_1234",
    },
    expires: 0,
    ratelimit: {
      type: PostV1KeysUpdateKeyType.Fast,
      limit: 10,
      refillRate: 1,
      refillInterval: 60,
    },
    remaining: 1000,
    refill: {
      interval: PostV1KeysUpdateKeyInterval.Daily,
      amount: 100,
    },
    enabled: true,
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1KeysUpdateKeyRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1KeysUpdateKeyResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1KeysUpdateRemaining

Example Usage

import { SDK } from "openapi";
import { Op } from "openapi/models/operations";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1KeysUpdateRemaining({
    keyId: "key_123",
    op: Op.Decrement,
    value: 1,
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1KeysUpdateRemainingRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1KeysUpdateRemainingResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getV1KeysGetVerifications

Example Usage

import { SDK } from "openapi";
import { Granularity } from "openapi/models/operations";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.getV1KeysGetVerifications({
    keyId: "key_1234",
    ownerId: "chronark",
    start: 1620000000000,
    end: 1620000000000,
    granularity: Granularity.Day,
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1KeysGetVerificationsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1KeysGetVerificationsResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getVxKeysGetVerifications

Example Usage

import { SDK } from "openapi";
import { QueryParamGranularity } from "openapi/models/operations";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.getVxKeysGetVerifications({
    keyId: "key_1234",
    ownerId: "chronark",
    start: 1620000000000,
    end: 1620000000000,
    granularity: QueryParamGranularity.Day,
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.GetVxKeysGetVerificationsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetVxKeysGetVerificationsResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getV1ApisGetApi

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const apiId = "api_1234";
  
  const result = await sdk.getV1ApisGetApi(apiId);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
apiId string ✔️ N/A [object Object]
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1ApisGetApiResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1ApisCreateApi

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1ApisCreateApi({
    name: "my-api",
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1ApisCreateApiRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1ApisCreateApiResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getV1ApisListKeys

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const apiId = "api_1234";
  const limit = 100;
  const cursor = "<value>";
  const ownerId = "<value>";
  
  const result = await sdk.getV1ApisListKeys(apiId, limit, cursor, ownerId);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
apiId string ✔️ N/A [object Object]
limit number N/A [object Object]
cursor string N/A
ownerId string N/A
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1ApisListKeysResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1ApisDeleteApi

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1ApisDeleteApi({
    apiId: "api_1234",
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1ApisDeleteApiRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1ApisDeleteApiResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

putV1KeysKeyId

Example Usage

import { SDK } from "openapi";
import { PutV1KeysKeyIdType } from "openapi/models/operations";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const keyId = "key_123";
  const requestBody = {
    name: "Customer X",
    ownerId: "user_123",
    meta: {
      "roles": "<value>",
      "stripeCustomerId": "cus_1234",
    },
    expires: 0,
    ratelimit: {
      type: PutV1KeysKeyIdType.Fast,
      limit: 10,
      refillRate: 1,
      refillInterval: 60,
    },
    remaining: 1000,
  };
  
  const result = await sdk.putV1KeysKeyId(keyId, requestBody);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
keyId string ✔️ N/A [object Object]
requestBody operations.PutV1KeysKeyIdRequestBody ✔️ N/A
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PutV1KeysKeyIdResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getV1KeysKeyId

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.getV1KeysKeyId();

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1KeysKeyIdResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

deleteV1KeysKeyId

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.deleteV1KeysKeyId();

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.DeleteV1KeysKeyIdResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1Keys

Example Usage

import { SDK } from "openapi";
import { PostV1KeysType } from "openapi/models/operations";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const requestBody = {
    apiId: "api_123",
    name: "my key",
    ownerId: "team_123",
    meta: {
      "billingTier": "PRO",
      "trialEnds": "2023-06-16T17:16:37.161Z",
    },
    expires: 1623869797161,
    remaining: 1000,
    ratelimit: {
      type: PostV1KeysType.Fast,
      limit: 10,
      refillRate: 1,
      refillInterval: 60,
    },
  };
  
  const result = await sdk.postV1Keys(requestBody);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
requestBody operations.PostV1KeysRequestBody ✔️ N/A
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1KeysResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1KeysVerify

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1KeysVerify({
    apiId: "api_1234",
    key: "sk_1234",
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1KeysVerifyRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1KeysVerifyResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

postV1Apis

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const result = await sdk.postV1Apis({
    name: "my-api",
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.PostV1ApisRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.PostV1ApisResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getV1ApisApiId

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const apiId = "api_1234";
  
  const result = await sdk.getV1ApisApiId(apiId);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
apiId string ✔️ N/A [object Object]
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1ApisApiIdResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

deleteV1ApisApiId

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const apiId = "api_1234";
  
  const result = await sdk.deleteV1ApisApiId(apiId);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
apiId string ✔️ N/A [object Object]
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.DeleteV1ApisApiIdResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /

getV1ApisApiIdKeys

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  });

  const apiId = "api_1234";
  const limit = 100;
  const offset = 2757.36;
  const ownerId = "<value>";
  
  const result = await sdk.getV1ApisApiIdKeys(apiId, limit, offset, ownerId);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
apiId string ✔️ N/A [object Object]
limit number N/A [object Object]
offset number N/A
ownerId string N/A
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetV1ApisApiIdKeysResponse>

Errors

Error Object Status Code Content Type
errors.ErrBadRequest 400 application/json
errors.ErrUnauthorized 401 application/json
errors.ErrForbidden 403 application/json
errors.ErrNotFound 404 application/json
errors.ErrConflict 409 application/json
errors.ErrTooManyRequests 429 application/json
errors.ErrInternalServerError 500 application/json
errors.SDKError 4xx-5xx /