Skip to content

Create request tunnel

POST
/v1/requests/{id}/tunnel
curl --request POST \
--url https://localhost:8080/v1/requests/example/tunnel \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "provider": "cloudflare" }'

Creates a public tunnel to the enclave of an active request and returns its edge URL together with the issued credentials (an API key and/or a Basic auth username and password). Those credentials, not the account session or key, authenticate calls to /v1/tunnels/{id}/edge/api/{path}, which proxies query/run and document/search to env-enzo.

id
required
string

Request ID

Optional tunnel provider selection

Media typeapplication/json
object
provider
string
Allowed values: cloudflare ngrok local

Created

Media typeapplication/json
object
data
object
issued_credentials
Array<object>
object
secret
string
type
string
username
string
tunnel
object
api_url
string
connection_template
string
created_at
string
credentials
Array<object>
object
id
string
is_active
boolean
last_used_at
string
secret_preview
string
type
string
use_count
integer
username
string
edge_url
string
explorer_url
string
id
string
kind
string
last_error
string
local_forward_command
string
provider
string
public_host
string
public_port
integer
public_url
string
sidecar_name
string
status
string
updated_at
string
usage_events
Array<object>
object
action_type
string
id
string
ip_address
string
metadata
timestamp
string
success
boolean

Example generated

{
"data": {
"issued_credentials": [
{
"secret": "example",
"type": "example",
"username": "example"
}
],
"tunnel": {
"api_url": "example",
"connection_template": "example",
"created_at": "example",
"credentials": [
{
"id": "example",
"is_active": true,
"last_used_at": "example",
"secret_preview": "example",
"type": "example",
"use_count": 1,
"username": "example"
}
],
"edge_url": "example",
"explorer_url": "example",
"id": "example",
"kind": "example",
"last_error": "example",
"local_forward_command": "example",
"provider": "example",
"public_host": "example",
"public_port": 1,
"public_url": "example",
"sidecar_name": "example",
"status": "example",
"updated_at": "example",
"usage_events": [
{
"action_type": "example",
"id": "example",
"ip_address": "example",
"metadata": "example",
"timestamp": "example"
}
]
}
},
"success": true
}

Bad Request

Media typeapplication/json
object
error
string
message
string
success
boolean

Example

{
"error": "",
"message": "Success",
"success": true
}

Unauthorized

Media typeapplication/json
object
error
string
message
string
success
boolean

Example

{
"error": "",
"message": "Success",
"success": true
}

Not Found

Media typeapplication/json
object
error
string
message
string
success
boolean

Example

{
"error": "",
"message": "Success",
"success": true
}

Conflict

Media typeapplication/json
object
error
string
message
string
success
boolean

Example

{
"error": "",
"message": "Success",
"success": true
}

Internal Server Error

Media typeapplication/json
object
error
string
message
string
success
boolean

Example

{
"error": "",
"message": "Success",
"success": true
}

Service Unavailable

Media typeapplication/json
object
error
string
message
string
success
boolean

Example

{
"error": "",
"message": "Success",
"success": true
}