feat: initial commit
This commit is contained in:
58
misc/rest/server.rest
Normal file
58
misc/rest/server.rest
Normal file
@ -0,0 +1,58 @@
|
||||
@baseUrl = http://localhost:3000
|
||||
|
||||
### Get agents
|
||||
|
||||
# @name getAgents
|
||||
GET {{ baseUrl }}/api/v1/agents
|
||||
Content-Type: application/json
|
||||
|
||||
@agentId = {{ getAgents.response.body.Data.Agents.0.ID }}
|
||||
|
||||
### Update an agent (accept it)
|
||||
|
||||
PUT {{ baseUrl }}/api/v1/agents/{{ agentId }}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"Status": 1
|
||||
}
|
||||
|
||||
### Get an agent
|
||||
|
||||
GET {{ baseUrl }}/api/v1/agents/{{ agentId }}
|
||||
Content-Type: application/json
|
||||
|
||||
### Get an agent specs
|
||||
|
||||
# @name getSpecs
|
||||
GET {{ baseUrl }}/api/v1/agents/{{ agentId }}/specs
|
||||
Content-Type: application/json
|
||||
|
||||
@specName = {{ getSpecs.response.body.Data.Specs.0.Name }}
|
||||
|
||||
### Update an agent specs
|
||||
|
||||
POST {{ baseUrl }}/api/v1/agents/2/specs
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"Name": "gateway.emissary.cadoles.com",
|
||||
"Revision": 0,
|
||||
"Data": {
|
||||
"gateways": {
|
||||
"cadoles.com":{
|
||||
"address":":3001",
|
||||
"target":"https://www.cadoles.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
### Delete an agent spec
|
||||
|
||||
DELETE {{ baseUrl }}/api/v1/agents/2/specs
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"Name": "gateway.emissary.cadoles.com"
|
||||
}
|
Reference in New Issue
Block a user