@runloop/api-client - v1.18.1
    Preparing search index...

    Class GatewayConfig

    Object-oriented interface for working with Gateway Configs.

    The GatewayConfig class provides a high-level, object-oriented API for managing gateway configurations. Gateway configs define how to proxy API requests through the credential gateway, specifying the target endpoint and how credentials should be applied. They can be used with devboxes to securely proxy requests to external APIs without exposing API keys.

    import { RunloopSDK } from '@runloop/api-client-ts';

    const runloop = new RunloopSDK();
    const gatewayConfig = await runloop.gatewayConfig.create({
    name: 'my-custom-api',
    endpoint: 'https://api.example.com',
    auth_mechanism: { type: 'bearer' },
    });

    const info = await gatewayConfig.getInfo();
    console.log(`Gateway Config: ${info.name}`);
    Index

    Accessors

    Methods

    Accessors

    Methods

    • Get the complete gateway config data from the API.

      Parameters

      • Optionaloptions: RequestOptions<unknown>

        Request options

      Returns Promise<Runloop.GatewayConfigView>

      The gateway config data

      const info = await gatewayConfig.getInfo();
      console.log(`Gateway Config: ${info.name}, endpoint: ${info.endpoint}`);