UDMG Agent Proxy Web Services
Introduction
The agent proxy client is exposing a REST API for the maintenance of the forwarding services. The port is configured with the 'client.api port
' parameter.
Below are the available endpoints and examples of requests and responses.
Agent Administration
Agent Proxy Status
GET /api/status/
- Retrieves the status of the client.
Response:
{
"agent": {
"status":"agent_status",
"agent_address":"agent_address"
},
"forwards": [
{
"name":"service_name",
"local_port":"service_local_port",
"service_address":"service_address",
"status":"service_status",
"last_message":"last_message"
},
{
"name":"service_name",
"local_port":"service_local_port",
"service_address":"service_address",
"status":"service_status",
"last_message":"last_message"
}
]
}
Save Configuration
POST /api/config/save?name=name
- Saves the current configuration.
The name
parameter is optional and the current config path will be used if it is not provided.
Agent Service Configuration
Proxy Services Status
GET /api/services/
- Retrieves the status of the services.
Response:
{
"forwards": {
"service_name1": {
"name":"service_name1",
"local_port":"service_local_port",
"service_address":"service_address",
"status":"service_status",
"last_message":"last_message"
},
"service_name2": {
"name":"service_name2",
"local_port":"service_local_port",
"service_address":"service_address",
"status":"service_status",
"last_message":"last_message"
}
}
}
SingleProxy Service Status
GET /api/services/:name
- Retrieves the status of a particular service.
Response:
{
"name":"service_name",
"local_port":"service_local_port",
"service_address":"service_address",
"status":"service_status",
"last_message":"last_message"
}
New Proxy Service
POST /api/services
- Creates a new service.
Request:
{
"name": "service_name",
"port": "service_port",
"host": "service_host"
}
Fields port
and host
are optional and the parameters will be obtained from the UDMG Server if they are not provided.
Agent Service Operation
Start Proxy Service
PUT /api/services/:name/start
- Starts a service.
Stop Proxy Service
PUT /api/services/:name/stop
- Stops a service.