Configuring Global Metrics
Function
This API is used to submit global metric configurations.
URI
POST /v1/{project_id}/global-setting
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which is used for resource isolation. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request
Table 2 describes the request parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Metric type |
| parameter | Yes | String | Global configuration parameters |
| data_format | No | String | Data format. The options are csv and json. This parameter is mandatory for User Attribute Table, Item Attribute List, and User Operation Behavior Table. |
| data_param | No | JSON | This parameter is mandatory when data_format is set to csv and optional for other data formats. |
| scene_id | Yes | String | Scenario ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| header | Yes | String | Whether to display the table header.
|
| delimiter | Yes | String | Delimiter. The value can contain a maximum of 10 characters. |
| quote | Yes | String | Quotation character. The value can contain a maximum of 10 characters. |
| escape | Yes | String | Escape character. The value can contain a maximum of 10 characters. |
Response
Table 4 describes the response parameters.
| Parameter | Type | Description |
|---|---|---|
| is_success | Boolean | Whether the request is successful |
| message | string | Response message |
| error_code | String | Error code that indicates a request has failed. This parameter is unavailable when a request is successful. |
| error_msg | String | Error message that indicates a request has failed. This parameter is unavailable when a request is successful. |
Example
- Example request
{ "type":"config_load_path", "parameter":"<Path for storing the global configuration parameters>" } - Example of a successful response
{ "is_success": true, "message": "Succeed to add the global setting." } - Example of a failed response
{ "is_success": false, "error_code": "res.2301", "error_msg": "Failed to resolve the token from the request." }
Status Code
For details about status codes, see Status Codes.
Last Article: Deleting Scenarios
Next Article: Obtaining Global Configuration Metrics
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.