SetServerConfig

2025-12-02 02:50:55  Updated

This API is used to set server-level parameters. Server-level parameters take effect in the specified scope.

Call description

Limitations

If you set a password in the request, you must specify the X-OCS-Auth field in the header for authentication. For more information, see Authentication based on public-key encryption.

Request path

POST /api/v1/observer/config PUT /api/v1/observer/config

Request parameters

Parameter Type Required Example value Description
observerConfig Map[string][string] Yes {
"memory_limit": "16G",
"system_memory": "8G"
}
Parameters of the OBServer node.
scope Object Yes For more information, see the data structure of Scope. The scope in which the server-level parameters take effect.

The data structure of Scope is as follows.

Parameter Type Required Example value Description
type string Yes "SERVER" The scope in which the parameters take effect. Valid values: GLOBAL, ZONE, and SERVER.
target []string No ["xxx.xxx.1:2886","xxx.xxx.2:2886"] or ["zone1","zone2"] If you set the type parameter to SERVER, you must set this parameter to a list of OBServer nodes. If you set the type parameter to ZONE, you must set this parameter to a list of zones. If you set the type parameter to GLOBAL, you do not need to specify this parameter.

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 The information about the asynchronous task. For more information, see GetDagDetails.
error Object The information about the error that occurred.

Examples

Sample request

POST xxx.xxx.1:2886/api/v1/observer/config

{
  "observerConfig": {
    "memory_limit": "16G",
    "system_memory": "8G"
  },
  "scope": {
    "target": [
        "xxx.xxx.1:2886",
        "xxx.xxx.2:2886"
    ],
    "type": "SERVER"
  }
}

Sample response

{
  "successful": true,
  "timestamp": "2024-01-09T17:11:43.385889278+08:00",
  "duration": 1,
  "status": 200,
  "traceId": "877fe32b83634153",
  "data": {
    "id": "22130706433028869",
    "dag_id": 4,
    "name": "Update observer config",
    "stage": 1,
    "max_stage": 1,
    "state": "READY",
    "operator": "RUN",
    "start_time": "2024-01-09T17:11:43.384630643+08:00",
    "end_time": "2024-01-09T17:11:43.384630643+08:00",
    "additional_data": null,
    "nodes": null
  }
}

Contact Us