Endpoints#

Do not construct this object directly, instead access the endpoints property of an ngrok.Client object.

class ngrok.services.EndpointsClient(client)[source]#

Endpoints provides an API for querying the endpoint objects which define what tunnel or edge is used to serve a hostport. Only active endpoints associated with a tunnel or backend are returned.

create(url='', type='', traffic_policy='', description=None, metadata=None, bindings=None)[source]#

Create an endpoint, currently available only for cloud endpoints

Parameters:
  • url (str) – the url of the endpoint

  • type (str) – whether the endpoint is ephemeral (served directly by an agent-initiated tunnel) or edge (served by an edge) or cloud (represents a cloud endpoint)

  • traffic_policy (str) – The traffic policy attached to this endpoint

  • description (str) – user-supplied description of the associated tunnel

  • metadata (str) – user-supplied metadata of the associated tunnel or edge object

  • bindings (Sequence[str]) – the bindings associated with this endpoint

https://ngrok.com/docs/api#api-endpoints-create

Return type:

Endpoint

delete(id)[source]#

Delete an Endpoint by ID, currently available only for cloud endpoints

Parameters:

id (str) – a resource identifier

https://ngrok.com/docs/api#api-endpoints-delete

get(id)[source]#

Get the status of an endpoint by ID

Parameters:

id (str) – a resource identifier

https://ngrok.com/docs/api#api-endpoints-get

Return type:

Endpoint

list(before_id=None, limit=None)[source]#

List all active endpoints on the account

Parameters:
  • before_id (str) –

  • limit (str) –

https://ngrok.com/docs/api#api-endpoints-list

Return type:

EndpointList

update(id, url=None, traffic_policy=None, description=None, metadata=None, bindings=None)[source]#

Update an Endpoint by ID, currently available only for cloud endpoints

Parameters:
  • id (str) – unique endpoint resource identifier

  • url (str) – the url of the endpoint

  • traffic_policy (str) – The traffic policy attached to this endpoint

  • description (str) – user-supplied description of the associated tunnel

  • metadata (str) – user-supplied metadata of the associated tunnel or edge object

  • bindings (Sequence[str]) – the bindings associated with this endpoint

https://ngrok.com/docs/api#api-endpoints-update

Return type:

Endpoint