This API operation is used to query the public key of the specified OBServer node.
Call description
Limitations
The OBShell server verifies the security of requests to this API operation. For more information, see Hybrid encryption for API operations.
Request path
GET /api/v1/secret
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | time.Time | 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 | AgentSecret | The agent secret information, which contains the following parameters:
|
| error | ApiError | The error caused by the request, which contains the following information:
|
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"
}
}