GetPublicKey

2024-06-28 05:30:31  Updated

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:
  • ip: the IP address of the OBServer node.
  • port: the port number of the OBServer node.
  • public_key the public key string of the OBServer node.
error ApiError The error caused by the request, which contains the following information:
  • code: the error code.
  • message: the error message.
  • subErrors: the suberrors.

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"
  }
}

Contact Us