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
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 review... |
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
ngrok api abuse-reports create [flags]
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
ngrok api abuse-reports get <id> [flags]
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. The ngrok agent can... |
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
ngrok api agent-ingresses create [flags]
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
ngrok api agent-ingresses delete <id> [flags]
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
ngrok api agent-ingresses get <id> [flags]
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
ngrok api agent-ingresses list [flags]
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
ngrok api agent-ingresses update <id> [flags]
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. The generated API key can... |
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
ngrok api api-keys create [flags]
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
ngrok api api-keys delete <id> [flags]
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
ngrok api api-keys get <id> [flags]
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
ngrok api api-keys list [flags]
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
ngrok api api-keys update <id> [flags]
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 |
--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 application-sessions
SubCommands
Command | Description |
---|
delete | Delete an application session by ID. |
get | Get an application session by ID. |
list | List all application sessions for this account. |
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 application-sessions delete
Delete an application session by ID.
Usage
ngrok api application-sessions delete <id> [flags]
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 application-sessions get
Get an application session by ID.
Usage
ngrok api application-sessions get <id> [flags]
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 application-sessions list
List all application sessions for this account.
Usage
ngrok api application-sessions list [flags]
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 application-users
SubCommands
Command | Description |
---|
delete | Delete an application user by ID. |
get | Get an application user by ID. |
list | List all application users for this account. |
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 application-users delete
Delete an application user by ID.
Usage
ngrok api application-users delete <id> [flags]
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 application-users get
Get an application user by ID.
Usage
ngrok api application-users get <id> [flags]
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 application-users list
List all application users for this account.
Usage
ngrok api application-users list [flags]
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 backends
SubCommands
Command | Description |
---|
failover | A Failover backend defines failover behavior within a list of refer... |
http-response | |
static-address | A static backend sends traffic to a TCP address (hostname and port)... |
tunnel-group | A Tunnel Group Backend balances traffic among all online tunnels th... |
weighted | A Weighted Backend balances traffic among the referenced backends. ... |
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 backends failover
A Failover backend defines failover behavior within a list of referenced
backends. Traffic is sent to the first backend in the list. If that backend
is offline or no connection can be established, ngrok attempts to connect to
the next backend in the list until one is successful.
SubCommands
Command | Description |
---|
create | Create a new Failover backend |
delete | Delete a Failover backend by ID. |
get | Get detailed information about a Failover backe... |
list | List all Failover backends on this account |
update | Update Failover backend 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 backends failover create