Skip to main content

Endpoints

List Endpoints

List all active endpoints on the account

Request

GET /endpoints

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/endpoints

Response

Returns a 200 response on success

Example Response

{
"endpoints": [
{
"created_at": "2024-09-10T19:55:17Z",
"hostport": "8a0b154f56c0.ngrok.paid:443",
"id": "ep_2ltSwSy6Nm2Lcd79ZQ9c7BeeDkQ",
"principal_id": {
"id": "usr_2ltStws6MiusgDndbKs6Fb0CCpV",
"uri": ""
},
"proto": "https",
"public_url": "https://8a0b154f56c0.ngrok.paid",
"tunnel": {
"id": "tn_2ltSwSy6Nm2Lcd79ZQ9c7BeeDkQ",
"uri": "https://api.ngrok.com/tunnels/tn_2ltSwSy6Nm2Lcd79ZQ9c7BeeDkQ"
},
"tunnel_session": {
"id": "ts_2ltSwPuLx2p9UeRQh2skkV2RM49",
"uri": "https://api.ngrok.com/tunnel_sessions/ts_2ltSwPuLx2p9UeRQh2skkV2RM49"
},
"type": "ephemeral",
"updated_at": "2024-09-10T19:55:17Z",
"upstream_url": "http://localhost:80",
"url": "https://8a0b154f56c0.ngrok.paid"
},
{
"created_at": "2024-09-10T19:55:14Z",
"domain": {
"id": "rd_2ltSw8dWZkIcBb2YkhDUDZQxV2q",
"uri": "https://api.ngrok.com/reserved_domains/rd_2ltSw8dWZkIcBb2YkhDUDZQxV2q"
},
"edge": {
"id": "edgtls_2ltSw6Y7SttlrgUG5N4fMeNOla5",
"uri": "https://api.ngrok.com/edges/tls/edgtls_2ltSw6Y7SttlrgUG5N4fMeNOla5"
},
"hostport": "endpoint-example2.com:443",
"id": "ep_2ltSw2LYy38FNnx1azGIs71UgoB",
"proto": "tls",
"public_url": "tls://endpoint-example2.com",
"type": "edge",
"updated_at": "2024-09-10T19:55:14Z"
}
],
"next_page_uri": null,
"uri": "https://api.ngrok.com/endpoints"
}

Fields

NameTypeDescription
endpointsEndpointthe list of all active endpoints on this account
uristringURI of the endpoints list API resource
next_page_uristringURI of the next page, or null if there is no next page

Endpoint fields

NameTypeDescription
idstringunique endpoint resource identifier
regionstringidentifier of the region this endpoint belongs to
created_atstringtimestamp when the endpoint was created in RFC 3339 format
updated_atstringtimestamp when the endpoint was updated in RFC 3339 format
public_urlstringURL of the hostport served by this endpoint
protostringprotocol served by this endpoint. one of http, https, tcp, or tls
schemestring
hostportstringhostport served by this endpoint (hostname:port) -> soon to be deprecated
hoststring
portint64
typestringwhether the endpoint is ephemeral (served directly by an agent-initiated tunnel) or edge (served by an edge) or cloud (represents a cloud endpoint)
metadatastringuser-supplied metadata of the associated tunnel or edge object
descriptionstringuser-supplied description of the associated tunnel
domainRefthe domain reserved for this endpoint
tcp_addrRefthe address reserved for this endpoint
tunnelRefthe tunnel serving requests to this endpoint, if this is an ephemeral endpoint
edgeRefthe edge serving requests to this endpoint, if this is an edge endpoint
upstream_urlstringthe local address the tunnel forwards to
upstream_protostringthe protocol the agent uses to forward with
urlstringthe url of the endpoint
principal_idRefThe ID of the owner (bot or user) that owns this endpoint
traffic_policystringThe traffic policy attached to this endpoint
bindingsList<string>the bindings associated with this endpoint
tunnel_sessionRefThe tunnel session of the agent for this endpoint

Ref fields

NameTypeDescription
idstringa resource identifier
uristringa uri for locating a resource

Get Endpoint

Get the status of an endpoint by ID

Request

GET /endpoints/{id}

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/endpoints/ep_2ltSwSy6Nm2Lcd79ZQ9c7BeeDkQ

Response

Returns a 200 response on success

Example Response

{
"created_at": "2024-09-10T19:55:17Z",
"hostport": "8a0b154f56c0.ngrok.paid:443",
"id": "ep_2ltSwSy6Nm2Lcd79ZQ9c7BeeDkQ",
"principal_id": {
"id": "usr_2ltStws6MiusgDndbKs6Fb0CCpV",
"uri": ""
},
"proto": "https",
"public_url": "https://8a0b154f56c0.ngrok.paid",
"tunnel": {
"id": "tn_2ltSwSy6Nm2Lcd79ZQ9c7BeeDkQ",
"uri": "https://api.ngrok.com/tunnels/tn_2ltSwSy6Nm2Lcd79ZQ9c7BeeDkQ"
},
"tunnel_session": {
"id": "ts_2ltSwPuLx2p9UeRQh2skkV2RM49",
"uri": "https://api.ngrok.com/tunnel_sessions/ts_2ltSwPuLx2p9UeRQh2skkV2RM49"
},
"type": "ephemeral",
"updated_at": "2024-09-10T19:55:17Z",
"upstream_url": "http://localhost:80",
"url": "https://8a0b154f56c0.ngrok.paid"
}

Fields

NameTypeDescription
idstringunique endpoint resource identifier
regionstringidentifier of the region this endpoint belongs to
created_atstringtimestamp when the endpoint was created in RFC 3339 format
updated_atstringtimestamp when the endpoint was updated in RFC 3339 format
public_urlstringURL of the hostport served by this endpoint
protostringprotocol served by this endpoint. one of http, https, tcp, or tls
schemestring
hostportstringhostport served by this endpoint (hostname:port) -> soon to be deprecated
hoststring
portint64
typestringwhether the endpoint is ephemeral (served directly by an agent-initiated tunnel) or edge (served by an edge) or cloud (represents a cloud endpoint)
metadatastringuser-supplied metadata of the associated tunnel or edge object
descriptionstringuser-supplied description of the associated tunnel
domainRefthe domain reserved for this endpoint
tcp_addrRefthe address reserved for this endpoint
tunnelRefthe tunnel serving requests to this endpoint, if this is an ephemeral endpoint
edgeRefthe edge serving requests to this endpoint, if this is an edge endpoint
upstream_urlstringthe local address the tunnel forwards to
upstream_protostringthe protocol the agent uses to forward with
urlstringthe url of the endpoint
principal_idRefThe ID of the owner (bot or user) that owns this endpoint
traffic_policystringThe traffic policy attached to this endpoint
bindingsList<string>the bindings associated with this endpoint
tunnel_sessionRefThe tunnel session of the agent for this endpoint

Ref fields

NameTypeDescription
idstringa resource identifier
uristringa uri for locating a resource