This API is used to obtain the public key of the specified OBServer node.
Call description
Request path
GET /api/v1/secret
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. |
| data | Object | For more information, see the data structure of AgentSecret. |
| error | Object | The information about the error that occurred. |
The following table describes the data structure of AgentSecret.
| Parameter | Type | Description |
|---|---|---|
| ip | String | The IP address of the OBServer node. |
| port | Integer | The port number of the OBServer node. |
| public_key | String | The public key of the OBServer node. |
Examples
Sample request
GET x.x.x.x:2886/api/v1/secret
Sample response
{
"successful": true,
"timestamp": "2024-01-09T17:29:04.826345518+08:00",
"duration": 0,
"status": 200,
"traceId": "672cc42c132a4b90",
"data": {
"ip": "x.x.x.x",
"port": 2886,
"public_key": "xxxxxxxxxxx"
}
}