# ngrok

> Manage ngrok endpoints, agents, reserved domains and TCP addresses, API keys and IP policies, and follow new endpoints, agents and tunnels.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/ngrok

## Actions

### Add IP policy rule

Add a rule to an IP policy that allows or denies an IP address or range.

**Inputs**

- IP policy (`ip_policy_id`, text, required): The IP policy.
- IP address or range (`cidr`, text, required): The IP address or range in CIDR notation, such as 203.0.113.7/32 or 2001:db8::/32.
- Action (`rule_action`, text, required): Whether the rule lets the addresses in or keeps them out. One of: `allow`, `deny`.
- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "action": "example",
    "cidr": "example",
    "created_at": "example",
    "description": "example",
    "id": "example",
    "ip_policy": {
      "id": "example",
      "uri": "example"
    },
    "metadata": "example",
    "uri": "example"
  }
}
```

### Create API key

Create an ngrok API key. Its token is in the result this once and can't be read again.

**Inputs**

- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "metadata": "example",
    "owner_id": "example",
    "token": "example",
    "uri": "example"
  }
}
```

### Create cloud endpoint

Create an always-on cloud endpoint at a URL, with the Traffic Policy that answers its requests.

**Inputs**

- URL (`url`, text, required): The endpoint's URL, such as https://shop.internal or https://example.ngrok.app. A public URL needs a domain reserved in the account.
- Traffic Policy (`traffic_policy`, text, required): The endpoint's Traffic Policy, in YAML or JSON. A cloud endpoint's policy must answer every request itself, for example with a custom-response, redirect or forward-internal action.
- Reachable from (`binding`, text): Who can reach the endpoint: anyone on the internet (public), only your other ngrok endpoints (internal, for URLs ending in .internal), or a Kubernetes cluster running the ngrok operator. One of: `public` (Public (the internet)), `internal` (Internal (other ngrok endpoints)), `kubernetes` (Kubernetes cluster).
- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.
- Allow pooling (`pooling_enabled`, true/false): Let other endpoints with the same URL share its traffic.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "bindings": [
      "example"
    ],
    "created_at": "example",
    "description": "example",
    "domain": {
      "id": "example",
      "uri": "example"
    },
    "edge": {
      "id": "example",
      "uri": "example"
    },
    "hostport": "example",
    "id": "example",
    "metadata": "example",
    "name": "example",
    "pooling_enabled": true,
    "principal": {
      "id": "example",
      "uri": "example"
    },
    "proto": "example",
    "public_url": "example",
    "region": "example",
    "tcp_addr": {
      "id": "example",
      "uri": "example"
    },
    "traffic_policy": "example",
    "tunnel": {
      "id": "example",
      "uri": "example"
    },
    "tunnel_session": {
      "id": "example",
      "uri": "example"
    },
    "type": "example",
    "updated_at": "example",
    "upstream_protocol": "example",
    "upstream_url": "example",
    "uri": "example",
    "url": "example"
  }
}
```

### Create IP policy

Create an IP policy, a named set of allow and deny rules for IP addresses.

**Inputs**

- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "description": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}
```

### Delete API key

Delete an API key. Anything using it loses access to the ngrok API at once.

**Inputs**

- API key (`api_key_id`, text, required): The API key.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete cloud endpoint

Delete a cloud endpoint. Its URL stops answering at once.

**Inputs**

- Cloud endpoint (`endpoint_id`, text, required): The cloud endpoint.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete IP policy

Delete an IP policy.

**Inputs**

- IP policy (`ip_policy_id`, text, required): The IP policy.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete IP policy rule

Delete one rule from an IP policy.

**Inputs**

- IP policy rule (`ip_policy_rule_id`, text, required): The IP policy rule.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Get endpoint

Get an endpoint's URL, type, bindings, Traffic Policy and what serves it.

**Inputs**

- Endpoint (`endpoint_id`, text, required): The endpoint.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "bindings": [
      "example"
    ],
    "created_at": "example",
    "description": "example",
    "domain": {
      "id": "example",
      "uri": "example"
    },
    "edge": {
      "id": "example",
      "uri": "example"
    },
    "hostport": "example",
    "id": "example",
    "metadata": "example",
    "name": "example",
    "pooling_enabled": true,
    "principal": {
      "id": "example",
      "uri": "example"
    },
    "proto": "example",
    "public_url": "example",
    "region": "example",
    "tcp_addr": {
      "id": "example",
      "uri": "example"
    },
    "traffic_policy": "example",
    "tunnel": {
      "id": "example",
      "uri": "example"
    },
    "tunnel_session": {
      "id": "example",
      "uri": "example"
    },
    "type": "example",
    "updated_at": "example",
    "upstream_protocol": "example",
    "upstream_url": "example",
    "uri": "example",
    "url": "example"
  }
}
```

### Get reserved domain

Get a reserved domain and the DNS target to point a custom domain at.

**Inputs**

- Reserved domain (`reserved_domain_id`, text, required): The reserved domain.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "acme_challenge_cname_target": "example",
    "cname_target": "example",
    "created_at": "example",
    "description": "example",
    "domain": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}
```

### List agents

List the ngrok agents online now (tunnel sessions): where each runs, its version and IP address.

**Inputs**

- How many (`limit`, number): How many to return. Leave empty for ngrok's default page. At least 1.
- Before ID (`before_id`, text): For the next page: the ID of the last entry of the page before. Lists come newest first.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "next_page_uri": "example",
    "tunnel_sessions": [
      {
        "agent_version": "example",
        "credential": {
          "id": "example",
          "uri": "example"
        },
        "id": "example",
        "ip": "example",
        "metadata": "example",
        "os": "example",
        "region": "example",
        "started_at": "example",
        "transport": "example",
        "uri": "example"
      }
    ],
    "uri": "example"
  }
}
```

### List API keys

List the account's API keys, newest first. Their secret tokens aren't shown.

**Inputs**

- How many (`limit`, number): How many to return. Leave empty for ngrok's default page. At least 1.
- Before ID (`before_id`, text): For the next page: the ID of the last entry of the page before. Lists come newest first.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "keys": [
      {
        "created_at": "example",
        "description": "example",
        "id": "example",
        "metadata": "example",
        "owner_id": "example",
        "token": "example",
        "uri": "example"
      }
    ],
    "next_page_uri": "example",
    "uri": "example"
  }
}
```

### List endpoints

List the account's online endpoints: agent endpoints and cloud endpoints, newest first.

**Inputs**

- How many (`limit`, number): How many to return. Leave empty for ngrok's default page. At least 1.
- Before ID (`before_id`, text): For the next page: the ID of the last entry of the page before. Lists come newest first.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "endpoints": [
      {
        "bindings": [
          "example"
        ],
        "created_at": "example",
        "description": "example",
        "domain": {
          "id": "example",
          "uri": "example"
        },
        "edge": {
          "id": "example",
          "uri": "example"
        },
        "hostport": "example",
        "id": "example",
        "metadata": "example",
        "name": "example",
        "pooling_enabled": true,
        "principal": {
          "id": "example",
          "uri": "example"
        },
        "proto": "example",
        "public_url": "example",
        "region": "example",
        "tcp_addr": {
          "id": "example",
          "uri": "example"
        },
        "traffic_policy": "example",
        "tunnel": {
          "id": "example",
          "uri": "example"
        },
        "tunnel_session": {
          "id": "example",
          "uri": "example"
        },
        "type": "example",
        "updated_at": "example",
        "upstream_protocol": "example",
        "upstream_url": "example",
        "uri": "example",
        "url": "example"
      }
    ],
    "next_page_uri": "example",
    "uri": "example"
  }
}
```

### List IP policies

List the account's IP policies, newest first.

**Inputs**

- How many (`limit`, number): How many to return. Leave empty for ngrok's default page. At least 1.
- Before ID (`before_id`, text): For the next page: the ID of the last entry of the page before. Lists come newest first.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "ip_policies": [
      {
        "created_at": "example",
        "description": "example",
        "id": "example",
        "metadata": "example",
        "uri": "example"
      }
    ],
    "next_page_uri": "example",
    "uri": "example"
  }
}
```

### List reserved addresses

List the TCP addresses reserved in the account, newest first.

**Inputs**

- How many (`limit`, number): How many to return. Leave empty for ngrok's default page. At least 1.
- Before ID (`before_id`, text): For the next page: the ID of the last entry of the page before. Lists come newest first.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "next_page_uri": "example",
    "reserved_addrs": [
      {
        "addr": "example",
        "created_at": "example",
        "description": "example",
        "id": "example",
        "metadata": "example",
        "region": "example",
        "uri": "example"
      }
    ],
    "uri": "example"
  }
}
```

### List reserved domains

List the domains reserved in the account, newest first.

**Inputs**

- How many (`limit`, number): How many to return. Leave empty for ngrok's default page. At least 1.
- Before ID (`before_id`, text): For the next page: the ID of the last entry of the page before. Lists come newest first.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "next_page_uri": "example",
    "reserved_domains": [
      {
        "acme_challenge_cname_target": "example",
        "cname_target": "example",
        "created_at": "example",
        "description": "example",
        "domain": "example",
        "id": "example",
        "metadata": "example",
        "uri": "example"
      }
    ],
    "uri": "example"
  }
}
```

### List tunnels

List the tunnels the account's online agents have open, newest first.

**Inputs**

- How many (`limit`, number): How many to return. Leave empty for ngrok's default page. At least 1.
- Before ID (`before_id`, text): For the next page: the ID of the last entry of the page before. Lists come newest first.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "next_page_uri": "example",
    "tunnels": [
      {
        "endpoint": {
          "id": "example",
          "uri": "example"
        },
        "forwards_to": "example",
        "id": "example",
        "metadata": "example",
        "proto": "example",
        "public_url": "example",
        "region": "example",
        "started_at": "example",
        "tunnel_session": {
          "id": "example",
          "uri": "example"
        }
      }
    ],
    "uri": "example"
  }
}
```

### Release reserved domain

Release a reserved domain from the account. Someone else may then reserve it.

**Inputs**

- Reserved domain (`reserved_domain_id`, text, required): The reserved domain.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Release reserved TCP address

Release a reserved TCP address from the account.

**Inputs**

- Reserved address (`reserved_address_id`, text, required): The reserved TCP address.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Reserve domain

Reserve a domain for the account: a subdomain of an ngrok domain, such as shop.ngrok.app, or a domain of your own.

**Inputs**

- Domain (`domain`, text, required): The hostname to reserve, such as shop.ngrok.app or app.example.com.
- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "acme_challenge_cname_target": "example",
    "cname_target": "example",
    "created_at": "example",
    "description": "example",
    "domain": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}
```

### Reserve TCP address

Reserve a fixed TCP address (host and port) for the account, in the region you choose.

**Inputs**

- Region (`region`, text): The region to reserve it in. Leave empty for the United States. One of: `us` (United States (Ohio)), `eu` (Europe (Frankfurt)), `ap` (Asia/Pacific (Singapore)), `au` (Australia (Sydney)), `jp` (Japan (Tokyo)), `in` (India (Mumbai)), `sa` (South America (São Paulo)).
- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "addr": "example",
    "created_at": "example",
    "description": "example",
    "id": "example",
    "metadata": "example",
    "region": "example",
    "uri": "example"
  }
}
```

### Restart agent

Tell an online agent to restart. It reconnects as a new agent session. Not supported on Windows.

**Inputs**

- Agent (`agent_id`, text, required): The online agent (tunnel session).

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "id": "example",
    "sent": true
  }
}
```

### Stop agent

Tell an online agent to exit. Its tunnels close until someone starts it again.

**Inputs**

- Agent (`agent_id`, text, required): The online agent (tunnel session).

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "id": "example",
    "sent": true
  }
}
```

### Update cloud endpoint

Change a cloud endpoint's URL, Traffic Policy, description or metadata. Only the fields filled in change.

**Inputs**

- Cloud endpoint (`endpoint_id`, text, required): The cloud endpoint.
- URL (`url`, text): A new URL for the endpoint.
- Traffic Policy (`traffic_policy`, text): The endpoint's Traffic Policy, in YAML or JSON. A cloud endpoint's policy must answer every request itself, for example with a custom-response, redirect or forward-internal action.
- Reachable from (`binding`, text): Who can reach the endpoint: anyone on the internet (public), only your other ngrok endpoints (internal, for URLs ending in .internal), or a Kubernetes cluster running the ngrok operator. One of: `public` (Public (the internet)), `internal` (Internal (other ngrok endpoints)), `kubernetes` (Kubernetes cluster).
- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.
- Allow pooling (`pooling_enabled`, true/false): Let other endpoints with the same URL share its traffic.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "bindings": [
      "example"
    ],
    "created_at": "example",
    "description": "example",
    "domain": {
      "id": "example",
      "uri": "example"
    },
    "edge": {
      "id": "example",
      "uri": "example"
    },
    "hostport": "example",
    "id": "example",
    "metadata": "example",
    "name": "example",
    "pooling_enabled": true,
    "principal": {
      "id": "example",
      "uri": "example"
    },
    "proto": "example",
    "public_url": "example",
    "region": "example",
    "tcp_addr": {
      "id": "example",
      "uri": "example"
    },
    "traffic_policy": "example",
    "tunnel": {
      "id": "example",
      "uri": "example"
    },
    "tunnel_session": {
      "id": "example",
      "uri": "example"
    },
    "type": "example",
    "updated_at": "example",
    "upstream_protocol": "example",
    "upstream_url": "example",
    "uri": "example",
    "url": "example"
  }
}
```

### Update reserved domain

Change a reserved domain's description or metadata.

**Inputs**

- Reserved domain (`reserved_domain_id`, text, required): The reserved domain.
- Description (`description`, text): A note on what it's for, up to 255 characters.
- Metadata (`metadata`, text): Your own data to keep with it, such as a JSON string, up to 4096 characters.

**Outputs**

- `data` (object): The response from ngrok.

**Example output**

```json
{
  "data": {
    "acme_challenge_cname_target": "example",
    "cname_target": "example",
    "created_at": "example",
    "description": "example",
    "domain": "example",
    "id": "example",
    "metadata": "example",
    "uri": "example"
  }
}
```
