mirror of
https://github.com/openziti/ziti.git
synced 2026-09-25 03:42:38 +00:00
49 lines
1.2 KiB
HTTP
49 lines
1.2 KiB
HTTP
# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
|
|
#
|
|
# Following HTTP Request Live Templates are available:
|
|
# * 'gtrp' and 'gtr' create a GET request with or without query parameters;
|
|
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
|
|
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
|
|
|
|
POST {{edge_controller_url}}/authenticate?method=password
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"username": "admin",
|
|
"password": "admin"
|
|
}
|
|
|
|
> {% client.global.set("session_token", response.body.data.session.token); %}
|
|
|
|
###
|
|
|
|
POST {{edge_controller_url}}/clusters
|
|
Content-Type: application/json
|
|
zt-session: {{session_token}}
|
|
|
|
{ "name": "cluster1" }
|
|
|
|
> {% client.global.set("cluster_id", response.body.data.id); %}
|
|
|
|
###
|
|
|
|
POST {{edge_controller_url}}/gateways
|
|
Content-Type: application/json
|
|
zt-session: {{session_token}}
|
|
|
|
{
|
|
"name": "gw1",
|
|
"clusterId": "{{cluster_id}}"
|
|
}
|
|
|
|
> {% client.global.set("gw_id", response.body.data.id); %}
|
|
|
|
###
|
|
|
|
GET {{edge_controller_url}}/gateways/{{gw_id}}
|
|
Content-Type: application/json
|
|
zt-session: {{session_token}}
|
|
|
|
> {% client.global.set("jwt", response.body.data[0].enrollment.jwt); %}
|
|
###
|