Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.
GET
/v1/branches/{id}/connection
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.elefork.com/v1/branches/example/connection?wake=true"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.elefork.com/v1/branches/example/connection?wake=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.elefork.com/v1/branches/example/connection?wake=true' \ --header 'Authorization: Bearer <token>'Production clients connect through the gateway with POST /v1/branches/{id}/credentials.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Query Parameters
Section titled “Query Parameters”wake
string
wait
string
Long-poll up to this duration (e.g. 10s; capped at 30 s).
Responses
Section titled “Responses”Connection details
Media typeapplication/json
object
endpoint_id
required
string
address
required
string
generation
required
integer
database
required
string
user
required
string
note
string
Example generated
{ "endpoint_id": "example", "address": "example", "generation": 1, "database": "example", "user": "example", "note": "example"}Operation started
Media typeapplication/json
object
operation
required
object
id
required
string
org_id
required
string
kind
required
string
state
required
string
error
string
params
required
object
result
required
object
created_at
required
string format: date-time
request_id
The API request that started the operation (X-Request-Id).
string
Example
{ "operation": { "kind": "create", "state": "pending" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}Error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "not_found" }}