ngrok Agent CLI API Commands
With the ngrok agent CLI, you can use built-in commands to interact with the ngrok API. For more information about the ngrok API and interfacing with it directly, see see the ngrok api page.
If you want to programmatically control the ngrok agent, the Agent SDKs are usually a more flexible and powerful choice.
ngrok api
The api command provides access to ngrok's API. You can use the API through one of the api subcommmands.
All api subcommands require an API key. You can configure it either through a command flag (--api-key) or add it in ngrok's configuration file (api_key).
You can get get the initial API key at https://dashboard.ngrok.com/api. Additional keys can be created through 'ngrok api api-key create' subcommand.
SubCommands
Command | Description |
---|---|
abuse-reports | Abuse Reports allow you to submit take-down requests for URLs hosted by ngrok that... |
agent-ingresses | |
api-keys | API Keys are used to authenticate to the ngrok API (https://ngrok |
application-sessions | |
application-users | |
backends | |
bot-users | |
certificate-authorities | Certificate Authorities are x509 certificates that are used to sign other x509... |
credentials | Tunnel Credentials are ngrok agent authtokens |
edge-modules | |
edges | |
endpoint-configurations | Endpoint Configurations are a reusable group of modules that encapsulate how traffic... |
endpoints | Endpoints provides an API for querying the endpoint objects which define what tunnel... |
event-destinations | |
event-sources | |
event-subscriptions | |
ip-policies | IP Policies are reusable groups of CIDR ranges with an allow or deny action |
ip-policy-rules | IP Policy Rules are the IPv4 or IPv6 CIDRs entries that make up an IP Policy. |
ip-restrictions | An IP restriction is a restriction placed on the CIDRs that are allowed to initiate... |
kubernetes-operators | KubernetesOperators is used by the Kubernetes Operator to register and manage its own... |
pointcfg-module | |
reserved-addrs | Reserved Addresses are TCP addresses that can be used to listen for traffic |
reserved-domains | Reserved Domains are hostnames that you can listen for traffic on |
root | |
secrets | Secrets is an api service for securely storing and managing sensitive data such as... |
ssh-certificate-authorities | An SSH Certificate Authority is a pair of an SSH Certificate and its private key that... |
ssh-credentials | SSH Credentials are SSH public keys that can be used to start SSH tunnels via the... |
ssh-host-certificates | SSH Host Certificates along with the corresponding private key allows an SSH server to... |
ssh-user-certificates | SSH User Certificates are presented by SSH clients when connecting to an SSH server to... |
tls-certificates | TLS Certificates are pairs of x509 certificates and their matching private key that... |
tunnel-sessions | Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel sessions... |
tunnels | Tunnels provide endpoints to access services exposed by a running ngrok agent tunnel... |
vaults | Vaults is an api service for securely storing and managing sensitive data such as... |
Flags
Flag | Description |
---|---|
--config | path to config files; they are merged if multiple |
ngrok api abuse-reports
Abuse Reports allow you to submit take-down requests for URLs hosted by ngrok that violate ngrok's terms of service.
SubCommands
Command | Description |
---|---|
create | Creates a new abuse report which will be... |
get | Get the detailed status of abuse report by ID. |
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api abuse-reports create
Creates a new abuse report which will be reviewed by our system and abuse response team. This API is only available to authorized accounts. Contact abuse@ngrok.com to request access
Usage
Loading…
Flags
Flag | Description |
---|---|
--metadata | arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. |
--urls | a list of URLs containing suspected abusive content |
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api abuse-reports get
Get the detailed status of abuse report by ID.
Usage
Loading…
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api agent-ingresses
SubCommands
Command | Description |
---|---|
create | Create a new Agent Ingress |
delete | Delete an Agent Ingress by ID |
get | Get the details of an Agent Ingress by ID. |
list | List all Agent Ingresses owned by this account |
update | Update attributes of an Agent Ingress by ID. |
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api agent-ingresses create
Create a new Agent Ingress. The ngrok agent can be configured to connect to ngrok via the new set of addresses on the returned Agent Ingress.
Usage
Loading…
Flags
Flag | Description |
---|---|
--certificate-management-policy.authority | certificate authority to request certificates from. The only supported value is letsencrypt. |
--certificate-management-policy.private-key-type | type of private key to use when requesting certificates. Defaults to rsa, can be either rsa or ecdsa. |
--description | human-readable description of the use of this Agent Ingress. optional, max 255 bytes. |
--domain | the domain that you own to be used as the base domain name to generate regional agent ingress domains. |
--metadata | arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes |
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api agent-ingresses delete
Delete an Agent Ingress by ID
Usage
Loading…
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api agent-ingresses get
Get the details of an Agent Ingress by ID.
Usage
Loading…
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api agent-ingresses list
List all Agent Ingresses owned by this account
Usage
Loading…
Flags
Flag | Description |
---|---|
--before-id | |
--limit | |
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api agent-ingresses update
Update attributes of an Agent Ingress by ID.
Usage
Loading…
Flags
Flag | Description |
---|---|
--certificate-management-policy.authority | certificate authority to request certificates from. The only supported value is letsencrypt. |
--certificate-management-policy.private-key-type | type of private key to use when requesting certificates. Defaults to rsa, can be either rsa or ecdsa. |
--description | human-readable description of the use of this Agent Ingress. optional, max 255 bytes. |
--metadata | arbitrary user-defined machine-readable data of this Agent Ingress. optional, max 4096 bytes |
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api api-keys
API Keys are used to authenticate to the ngrok API (https://ngrok.com/docs/api#authentication). You may use the API itself to provision and manage API Keys but you'll need to provision your first API key from the API Keys page (https://dashboard.ngrok.com/api/keys) on your ngrok.com dashboard.
SubCommands
Command | Description |
---|---|
create | Create a new API key |
delete | Delete an API key by ID |
get | Get the details of an API key by ID. |
list | List all API keys owned by this account |
update | Update attributes of an API key by ID. |
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api api-keys create
Create a new API key. The generated API key can be used to authenticate to the ngrok API.
Usage
Loading…
Flags
Flag | Description |
---|---|
--description | human-readable description of what uses the API key to authenticate. optional, max 255 bytes. |
--metadata | arbitrary user-defined data of this API key. optional, max 4096 bytes |
--owner-email | If supplied at credential creation, ownership will be assigned to the specified User. Only admins may specify an owner other than themselves. Both owner_id and owner_email may not be specified. |
--owner-id | If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot. |
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api api-keys delete
Delete an API key by ID
Usage
Loading…
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api api-keys get
Get the details of an API key by ID.
Usage
Loading…
Flags
Flag | Description |
---|---|
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api api-keys list
List all API keys owned by this account
Usage
Loading…
Flags
Flag | Description |
---|---|
--before-id | |
--limit | |
--api-key | API key to use |
--config | path to config files; they are merged if multiple |
--log | path to log file, 'stdout', 'stderr' or 'false' |
--log-format | log record format: 'term', 'logfmt', 'json' |
--log-level | logging level: 'debug', 'info', 'warn', 'error', 'crit' |
ngrok api api-keys update
Update attributes of an API key by ID.
Usage
Loading…