Skip to content

Add RUM Configuration



POST /api/v1/rum_cfg/add

Overview

Create a RUM application configuration and establish a Client Token association.

Prerequisites and Usage Steps

The current key must have the rum.rumCfgManage permission and is scoped to the current workspace only. First determine the application platform, display name, and appId. After creation, put the appId and clientToken plaintext from the response into the client SDK. DF-API-KEY is only used for this management request and must not be delivered to browsers.

customIdentity is a legacy compatibility field. When the appId key is present, it takes precedence (including an empty string); only when the final value is empty is one generated automatically. A custom application can optionally bind readable dashboards/built-in views; other types do not use dashboardUuids. The new token name is constructed from RUM- and the application name. An explicit Client Token can reuse an active value in the current workspace or create a separate new value.

The principal and token are submitted first, and the RUM data mapping is then synchronized asynchronously. Task submission or downstream failures usually record auxiliary status and keep this API successful; HTTP 200 does not prove that the data query replica is ready. This public response does not return AIAPI fields such as mapping_status, nor does it guarantee that the new token has taken effect on all collection nodes; validation through actual SDK integration is required. Creation has no idempotency key; on network failure, first query the summary list by appId/name to avoid duplicate creation or loss of new credentials.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI key with the required permissions from API Key Management in the target workspace.

Body Request Parameters

Parameter Type Required Description
dashboardUuids[*] string A single dsbd_ or itgr_ identifier string.
Example: dsbd_example
How to obtain or enter: Get a dsbd_ UUID from the Dashboard List or an itgr_ UUID from the Built-in View List, and confirm it is readable in the current workspace.
jsonContent.extend.custom key any Dynamic JSON value; can be an object, array, string, number, boolean, or null, not limited to strings. No fixed functional semantics are publicly defined; do not store sensitive credentials.
Example: payment
How to obtain or enter: Caller business data.
customIdentity string Optional string, up to 19 characters; used as a candidate only when the appId key is completely omitted. An explicit empty string for appId overrides this legacy field and triggers automatic generation; prefer appId.
Null allowed: False
Empty string allowed: True
$maxCharacterLength: 19
Example: payment_web
How to obtain or enter: Optional legacy-compatible application identifier at creation, agreed by the caller.
appId string Optional string, up to 48 characters; if omitted, customIdentity is used for compatibility; if the final value is empty, a value starting with appid_ is generated automatically. The current OpenAPI does not enforce AIAPI's alphanumeric underscore regex; for SDK/SourceMap compatibility, use only alphanumeric characters and underscores and do not include path symbols.
Null allowed: False
Empty string allowed: True
$maxCharacterLength: 48
Example: payment_web
How to obtain or enter: A unique application identifier agreed by the caller for use by the SDK; verify it against the summary list first.
dashboardUuids array Used only for creating a type=custom application in this request; if omitted or [], no binding is established; ignored for other types. dsbd_ must be active in the same workspace and readable; itgr_ must be a valid, non-hidden built-in view in the current language. Leading and trailing whitespace is trimmed from identifiers, and duplicates are removed.
Null allowed: False
Example: ["dsbd_example"]
How to obtain or enter: Get a dsbd_ UUID from the Dashboard List or an itgr_ UUID from the Built-in View List, and confirm it is readable in the current workspace.
jsonContent json Y Required JSON object for creation, containing name, type, and optional extend; this is not data collected by the client SDK.
Null allowed: False
Example: {"name": "支付Web", "type": "web", "extend": {}}
How to obtain or enter: Construct it from the application integration method, display name, and business display extensions.
jsonContent.name string Y Display name of the new application. Required string, up to 256 characters; active names in the same workspace must be unique; use a meaningful non-empty name.
Null allowed: False
Maximum length: 256
Example: 支付Web
How to obtain or enter: The application maintainer enters the display name.
jsonContent.type string Y Type of the application to create. Required: web/miniapp/android/ios/custom/reactnative/harmonyos; it cannot be changed through the update API after creation.
Null allowed: False
Allowed values: ['web', 'miniapp', 'android', 'ios', 'custom', 'reactnative', 'harmonyos']
Example: web
How to obtain or enter: Select based on the SDK/collection platform; this parameter cannot change an existing type.
jsonContent.extend json Optional extension object for this creation; there are no fixed required subkeys. If omitted, this key is not added. null, arrays, or strings are rejected by the declaration.
Null allowed: False
Example: {"team": "payment"}
How to obtain or enter: Used by the caller to store application display/edit extensions; before modification, read and copy the keys that must be retained.
clientToken string Optional Client Token plaintext; if omitted or empty, one is generated automatically. An explicit non-empty value can reuse an active token in the current workspace or create a new one if it does not exist site-wide. Do not enter the wctn_ internal UUID; the actual storage limit is 64 characters, and a 32-character random hexadecimal value is recommended.
Null allowed: False
Empty string allowed: True
Example: <RUM-CLIENT-TOKEN>
How to obtain or enter: Can be omitted and generated by the server, or obtain active token plaintext from Client Token Management in the current workspace; do not enter DF-API-KEY or a wctn_ internal UUID.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/rum_cfg/add' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"appId":"payment_web","jsonContent":{"name":"支付Web","type":"web","extend":{"team":"payment"}}}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.id integer or null Database row ID; the creation response may return a pre-submit snapshot and can be null. Not used as a public identifier.
content.uuid string Public compatibility alias; always equals appId, not the internal real RumCfg UUID.
content.appId string Application identifier used by the SDK/query.
content.workspaceUUID string UUID of the workspace it belongs to.
content.status integer Database status; active is usually 0, and deleted 3 is not in the summary list.
content.creator string Creation principal; for OpenAPI this is generally the Key resource UUID.
content.updator string Last update principal; may be empty if not updated after creation.
content.createAt integer Creation time in Unix seconds.
content.updateAt integer Update time in Unix seconds; may be -1 if not updated after creation.
content.deleteAt integer Deletion time in Unix seconds; -1 under normal conditions.
content.jsonContent object Application content object.
content.jsonContent.name string Application display name.
content.jsonContent.type string web/miniapp/android/ios/custom/reactnative/harmonyos.
content.jsonContent.extend object Optional saved dynamic extension; this key may be omitted when absent.
content.jsonContent.extend.custom key JSON Extension key-value saved by the caller; does not indicate that the server supports additional execution parameters.
content.clientToken string The creation response returns the valid Client Token plaintext, which must be stored securely; the update response has a compatibility branch; see that page for details.
content.declaration object or null Workspace common declaration attached to non-empty business objects; when not configured, it may be null or an empty object; an empty object is not added. It does not change the semantics of business fields with the same name on the entity itself.
{
  "code": 200,
  "content": {
    "id": null,
    "uuid": "payment_web",
    "appId": "payment_web",
    "workspaceUUID": "wksp_example",
    "status": 0,
    "creator": "wsak_example",
    "updator": "",
    "createAt": 1785427200,
    "updateAt": -1,
    "deleteAt": -1,
    "jsonContent": {
      "name": "支付Web",
      "type": "web",
      "extend": {
        "team": "payment"
      }
    },
    "clientToken": "<RUM-CLIENT-TOKEN>",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed A request field is missing, or the field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON top level is not an object Some JSON file format errors Submit an object containing jsonContent.
400 ft.SignNameRepeat The custom appId/newAppId is already used by an active configuration in the current workspace An identifier with the same name, payment_web, already exists in the current workspace Verify with the summary list; for modifications, locate the original appId; choose an unused identifier.
400 ft.RumSetNameRepeat An active application in the same workspace already uses this name A RUM configuration with the same name, 支付Web, already exists in the current workspace Choose an unused application name; if the result is unknown, query first and do not create repeatedly.
400 ft.InvalidRumDashboardID A dashboardUuids item for custom is invalid, missing, hidden, or not readable The dashboard associated with the custom RUM application is invalid or inaccessible Get a valid UUID from the currently readable dashboard/built-in view list; do not mix in UUIDs of other resources.
400 ft.RumClientTokenUnavailable The explicitly provided Client Token exists but is not active This Client Token is no longer available. Replace or regenerate it. Choose an active token in the current workspace or omit it during creation for automatic generation; do not reuse a revoked value.
400 ft.RumClientTokenWorkspaceMismatch The explicit token is already used by another workspace This Client Token is already used by another workspace. Replace or regenerate it. Use a dedicated token for the current workspace; do not copy collection credentials from other workspaces.
429 ft.OperationTooFrequently Other RUM create/update/delete/token operations in the current workspace hold the write lock, which was not acquired within 5 seconds Your operation is too frequent. Please try again later. Wait for other operations to finish and back off; read back the current state before retrying, and do not modify concurrently.
500 ft.InternalServerError Database/token creation, lock service, or unhandled configuration exception Internal error First query the summary list by appId/name to check whether the application has been created, and have an administrator check the token and asynchronous mapping; avoid duplicate creation or credential loss.

Feedback

Is this page helpful?