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

    Class GatewayConfigOps

    Gateway Config SDK interface for managing gateway configurations.

    The GatewayConfigOps class provides a high-level abstraction for managing gateway configurations, which define how to proxy API requests through the credential gateway. Gateway configs specify the target endpoint and how credentials should be applied, enabling secure API proxying without exposing API keys.

    This interface is accessed via RunloopSDK.gatewayConfig. You should construct a RunloopSDK instance and use it from there:

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

    // Use with a devbox
    const devbox = await runloop.devbox.create({
    name: 'my-devbox',
    gateways: {
    'MY_API': {
    gateway: gatewayConfig.id,
    secret: 'my-api-key-secret',
    },
    },
    });
    Index

    Methods

    • Get a gateway config object by its ID.

      Parameters

      • id: string

        The ID of the gateway config.

      Returns RunloopSDK.GatewayConfig

      A GatewayConfig instance.

      const runloop = new RunloopSDK();
      const gatewayConfig = runloop.gatewayConfig.fromId('gwc_1234567890');
      const info = await gatewayConfig.getInfo();
      console.log(`Gateway Config name: ${info.name}`);