中继
📫 中继
*/*application/jsonURL to send the session data to
https://my-webhook.com/dumpSuccess
The session ID
7349356945f1-SThe authorization token for the session
3500589645The status of the session
READYIf the session is ready to be used
If the session is linked to a relay
The error message if the session failed
Session failedThe webhook URL that we will call once the session is ready
https://my-webhook.com/dumpBad Request
Unauthorized
Forbidden
Internal Server Error
Service Unavailable
POST /v1/relays/sessions HTTP/1.1
Host: api.edgegap.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 69
{
"users": [],
"filters": [],
"webhook_url": "https://my-webhook.com/dump"
}{
"session_id": "7349356945f1-S",
"authorization_token": 3500589645,
"status": "READY",
"ready": true,
"linked": true,
"error": "Session failed",
"session_users": [
{
"ip_address": "1.1.1.1",
"latitude": 45.5088,
"longitude": -73.5878,
"authorization_token": 21986334
}
],
"relay": {
"ip": "2.2.2.2",
"host": "7349356945f1.st.edgegap.net",
"ports": {
"server": {
"port": 32000,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32000"
},
"client": {
"port": 32001,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32001"
}
}
},
"webhook_url": "https://my-webhook.com/dump"
}*/*application/jsonSuccess
The session ID
7349356945f1-SThe authorization token for the session
3500589645The status of the session
READYIf the session is ready to be used
If the session is linked to a relay
The error message if the session failed
Session failedThe webhook URL that we will call once the session is ready
https://my-webhook.com/dumpUnauthorized
Forbidden
Not Found
Internal Server Error
GET /v1/relays/sessions/{session_id} HTTP/1.1
Host: api.edgegap.com
Authorization: YOUR_API_KEY
Content-Type: text
Accept: */*
{
"session_id": "7349356945f1-S",
"authorization_token": 3500589645,
"status": "READY",
"ready": true,
"linked": true,
"error": "Session failed",
"session_users": [
{
"ip_address": "1.1.1.1",
"latitude": 45.5088,
"longitude": -73.5878,
"authorization_token": 21986334
}
],
"relay": {
"ip": "2.2.2.2",
"host": "7349356945f1.st.edgegap.net",
"ports": {
"server": {
"port": 32000,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32000"
},
"client": {
"port": 32001,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32001"
}
}
},
"webhook_url": "https://my-webhook.com/dump"
}*/*application/jsonSuccess
100Unauthorized
Forbidden
Internal Server Error
GET /v1/relays/sessions HTTP/1.1
Host: api.edgegap.com
Authorization: YOUR_API_KEY
Content-Type: text
Accept: */*
{
"sessions": [
{
"session_id": "7349356945f1-S",
"authorization_token": 3500589645,
"status": "READY",
"ready": true,
"linked": true,
"error": "Session failed",
"session_users": [
{
"ip_address": "1.1.1.1",
"latitude": 45.5088,
"longitude": -73.5878,
"authorization_token": 21986334
}
],
"relay": {
"ip": "2.2.2.2",
"host": "7349356945f1.st.edgegap.net",
"ports": {
"server": {
"port": 32000,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32000"
},
"client": {
"port": 32001,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32001"
}
}
},
"webhook_url": "https://my-webhook.com/dump"
}
],
"total_count": 100,
"pagination": {
"number": 1,
"next_page_number": 2,
"previous_page_number": 1,
"paginator": {
"num_pages": 10
},
"has_next": true,
"has_previous": false
}
}*/*application/jsonSession Request ID (ex: 0724828881e2-S)
0724828881e2-SUser Ip to Authorize
1.1.1.1Success
The session ID
7349356945f1-SThe authorization token for the session
3500589645The status of the session
READYIf the session is ready to be used
If the session is linked to a relay
The error message if the session failed
Session failedThe webhook URL that we will call once the session is ready
https://my-webhook.com/dumpBad Request
Unauthorized
Forbidden
Conflict
Internal Server Error
Service Unavailable
POST /v1/relays/sessions:authorize-user HTTP/1.1
Host: api.edgegap.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"session_id": "0724828881e2-S",
"user_ip": "1.1.1.1"
}{
"session_id": "7349356945f1-S",
"authorization_token": 3500589645,
"status": "READY",
"ready": true,
"linked": true,
"error": "Session failed",
"session_user": {},
"relay": {},
"webhook_url": "https://my-webhook.com/dump"
}*/*application/jsonSession Request ID (ex: 0724828881e2-S)
0724828881e2-SRelay Authorization Token
3500589645Success
The session ID
7349356945f1-SThe authorization token for the session
3500589645The status of the session
READYIf the session is ready to be used
If the session is linked to a relay
The error message if the session failed
Session failedThe webhook URL that we will call once the session is ready
https://my-webhook.com/dumpNo Content
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
POST /v1/relays/sessions:revoke-user HTTP/1.1
Host: api.edgegap.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 64
{
"session_id": "0724828881e2-S",
"authorization_token": 3500589645
}{
"session_id": "7349356945f1-S",
"authorization_token": 3500589645,
"status": "READY",
"ready": true,
"linked": true,
"error": "Session failed",
"session_users": [
{
"ip_address": "1.1.1.1",
"latitude": 45.5088,
"longitude": -73.5878,
"authorization_token": 21986334
}
],
"relay": {
"ip": "2.2.2.2",
"host": "7349356945f1.st.edgegap.net",
"ports": {
"server": {
"port": 32000,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32000"
},
"client": {
"port": 32001,
"protocol": "UDP",
"link": "7349356945f1.st.edgegap.net:32001"
}
}
},
"webhook_url": "https://my-webhook.com/dump"
}*/*application/jsonNo Content
无内容
Unauthorized
Forbidden
Not Found
Internal Server Error
Service Unavailable
DELETE /v1/relays/sessions/{session_id} HTTP/1.1
Host: api.edgegap.com
Authorization: YOUR_API_KEY
Content-Type: text
Accept: */*
无内容
最后更新于
这有帮助吗?

