Skip to content

Modify



POST /api/v1/objc_cfg/{objc_name}/modify

Overview

Update or create missing Resource Catalog display and reporting field configuration.

Before Calling and Usage Steps

This API requires an API Key with the infrastructure.setManage permission.

The objc_name path parameter identifies the actual category, and sourceType selects the type. If the target does not exist, a local configuration is created; this is not a strict update-only operation. You cannot use templateInfo.main[0].source.key to rename it. When templateInfo is omitted, most display fields are retained, but if objcGroupUUID is omitted, the group still becomes empty; to retain it, explicitly provide the original value.

Modification validates that the array must contain name with no duplicates only when the outer layer or template actually provides non-null fields, and the outer layer takes precedence. If both are omitted, an existing target retains its original fields; if the target does not exist, fields=[] is created, no name check is performed, and downstream filter rules are not updated. When fields are actually submitted, downstream reporting filters are synchronized; data missing required fields may be dropped, so verify with the collection side before changes. Creating an object type also calls custom_object filter synchronization after submission, which may affect the reporting filters of a custom object catalog with the same name; when modifying, passing fields is also processed and synchronized. Before creating a system object, verify the custom_object with the same name and its required fields; when only modifying display for a system object, do not submit fields (including fields inside the template).

When the template provides a non-empty main, omitting source.name can clear the alias, and omitting groups/fills sets them to []; if filters/columns/views are omitted, the pre-modification values are retained, while [] clears them. Icon configuration is saved as a whole. The template groupCfg.name can attempt to create a group, but the compatibility branch for an existing group with the same name may return 500; it is recommended to explicitly provide the objcGroupUUID of the current workspace; an empty string explicitly means no group.

Local configuration is submitted first, then downstream filters are synchronized; if synchronization fails, 500 may be returned but the local configuration has already been saved. Verify via list/export first, then retry. A successful response is a configuration entity, not a blocklist or complete template; this page does not confirm that collection has reported data or that the page has rendered.

Path Parameters

Parameter Type Required Description
objc_name string Y Required in delete Body; path export/modification use the same category name. The name must be consistent with the reporting class and URL-encoded in the path. The alias only controls display and is not used as the target name.
Example: example_resources
How to obtain or fill: Obtain the category code from content[].name in the Resource Catalog list; this is not the objc_ configuration UUID or alias.

Request Headers

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

Body Request Parameters

Parameter Type Required Description
fields[*] json Recommended object; business logic reads name; no per-item type validation is performed, and an incorrect shape may return 500 instead of a clean business error. It may contain display extension fields; the server does not uniformly validate their consumption effect.
Example: {"name": "name", "alias": "资源名称"}
How to obtain or fill: A single actual reporting field definition.
fields[*].name string Non-empty, matches ^[a-zA-Z]+[0-9a-zA-Z_]+$: starts with a letter, followed by digits/letters/_, at least 2 characters; must not be duplicated in the same array; dots/Chinese/single letters are not supported.
Example: name
How to obtain or fill: The field name must exactly match the reporting key and include at least name.
fields[*].alias string Optional display extension, not uniformly strongly validated by the server; omitting it does not affect the requirement for the name key.
Example: 资源名称
How to obtain or fill: The field display alias selected by the customer or the original exported value.
templateInfo.title string Optional; currently not saved by create/modify. The title in local configuration export is composed from alias/name. Modifying this value does not change the category name, alias, or exported title.
Example: 示例资源目录
How to obtain or fill: Title of the original exported template.
templateInfo.summary string Optional; currently not saved as the Resource Catalog entity description by create/modify; do not assume from a 200 that it has been persisted.
Example:
How to obtain or fill: Summary of the original exported template.
templateInfo.iconSet json Default {} on create; omitted on modify means retain, {} clears; dynamic objects are consumed by the template/UI, and icon URL validity is not uniformly validated.
Example: {}
How to obtain or fill: Original exported icon configuration or valid icon information selected by the business.
templateInfo.iconSet.icon string Optional example key; not any enum value is supported; select according to the actual UI icon.
Example: database
How to obtain or fill: Icon identifier supported by existing templates.
templateInfo.iconSet.url string Optional; the server does not send a request here to validate; do not put credential URLs.
Example: https://example.com/resource-icon.svg
How to obtain or fill: Legitimate icon resource URL accessible to the customer.
templateInfo.main array Create operations must provide at least 1 item; only the first item takes effect and multiple categories are not created in batch. If not provided on modify, most display fields are retained; after providing it, verify the default clearing behavior.
Example: [{}]
How to obtain or fill: Back up the entire main array from the exported template.
templateInfo.main[*] json Only index 0 is consumed; only 1 item is recommended.
Example: {}
How to obtain or fill: A single Resource Catalog template.
templateInfo.main[*].class string Actual source type on create; defaults to custom_object if omitted; public dynamic templates are not uniformly enum-validated, and other values may fail to store with 500. This value is ignored on modify; the actual type comes from the outer sourceType.
Example: custom_object
How to obtain or fill: Consistent with the outer sourceType and actual data type.
templateInfo.main[*].source json Required valid object on create; on modify, only source.name is read as the alias and the path category code is not changed. Do not directly backfill the string source from old system templates; convert it to an object first.
Example: {"key": "example_resources", "name": "示例资源目录"}
How to obtain or fill: Use the original reporting class code and the alias to display.
templateInfo.main[*].source.key string Required non-empty string for create operations, trimmed; the name storage column is 256, no unified length declaration is public, recommend <=256. Modification cannot rename based on this; path objc_name identifies the target.
Example: example_resources
How to obtain or fill: Category name exactly consistent with the object reporting class.
templateInfo.main[*].source.name string Defaults to empty string on create; on modify, once non-empty main is provided but source.name is omitted, the alias is set to empty rather than retained. Column 256, control length recommended.
Example: 示例资源目录
How to obtain or fill: Display alias selected by the customer, obtained from the original template/list alias.
templateInfo.main[*].groupCfg json When the outer objcGroupUUID is omitted, attempts to find or create a group by name; {} means no group; the compatibility branch for an existing same-name group may return 500, so for stable operations explicitly provide an existing UUID.
Example: {}
How to obtain or fill: Business group information from the export, or prefer explicit objcGroupUUID.
templateInfo.main[*].groupCfg.name string Optional, trimmed; omitted means no group. Attempts to create a new group, not just display information; if a group exists, prefer the outer UUID.
Example: 业务分组
How to obtain or fill: Obtain from an existing group name or a group name the customer wants to create.
templateInfo.main[*].fields array Same structure as outer fields; when outer fields is present, it overrides this value. On create, must ultimately contain name; on modify, if both are omitted, existing targets retain, while a missing target may be created with fields=[] without name validation or downstream synchronization.
Example: [{"name": "name"}]
How to obtain or fill: Fields that must be included in actual reporting, or main[0].fields from export.
templateInfo.main[*].fields[*] json Recommended object.
Example: {"name": "name", "alias": "名称"}
How to obtain or fill: Single field definition, consistent with outer fields.
templateInfo.main[*].fields[*].name string Rules same as fields[*].name; must ultimately contain name and have no duplicates.
Example: name
How to obtain or fill: Reporting field key.
templateInfo.main[*].fields[*].alias string Optional, does not replace name.
Example: 名称
How to obtain or fill: Display alias for this field.
templateInfo.main[*].filters array Defaults to [] on create; on modify, if the template does not provide this field, retain; [] clears; non-empty replaces as a whole.
Example: [{"key": "env"}]
How to obtain or fill: Quick filter configuration from the original template; fields come from actual object data.
templateInfo.main[*].filters[*] json Dynamic display object; the server saves it without executing query validation.
Example: {"key": "env"}
How to obtain or fill: A single quick filter item.
templateInfo.main[*].filters[*].key string Recommended non-empty real key; do not put a title.
Example: env
How to obtain or fill: Actual object attribute field name.
templateInfo.main[*].groups array Dynamic display array; defaults to [] on create; on modify, once non-empty main is provided but groups is omitted, it is also cleared to []. Not equivalent to the catalog business group objcGroupUUID.
Example: []
How to obtain or fill: Retain the group display configuration from the original export.
templateInfo.main[*].groups[*] JSON Preserve completely according to the original template; structure/enum is not uniformly strongly validated.
Example: env
How to obtain or fill: Group item supported by the existing UI configuration.
templateInfo.main[*].fills array Dynamic array; defaults to [] on create; on modify, if non-empty main is provided and fills is omitted, it is cleared to []. No unified server-side required substructure.
Example: []
How to obtain or fill: Retain from the original exported fill display configuration.
templateInfo.main[*].fills[*] JSON Preserve according to the original consumption structure; do not construct default rules from nothing.
Example: {}
How to obtain or fill: Actual fill configuration item in the existing UI template.
templateInfo.main[*].table json Optional object; default empty configuration on create; on modify, subfields not provided retain corresponding values.
Example: {}
How to obtain or fill: Copy from the list and detail display configuration of the original template.
templateInfo.main[*].table.columns array Defaults to [] on create; omitted on modify means retain, [] clears; different from fields collection filtering.
Example: [{"key": "name"}]
How to obtain or fill: Real object fields to display in the list.
templateInfo.main[*].table.columns[*] json Dynamic column object; additional display attributes are not uniformly validated.
Example: {"key": "name"}
How to obtain or fill: A single list display column.
templateInfo.main[*].table.columns[*].key string Column locating field, not an alias/title.
Example: name
How to obtain or fill: Actual reporting field name.
templateInfo.main[*].table.detail json Optional object; actual views must be in table.detail.views, not main.detail.views.
Example: {}
How to obtain or fill: Detail page settings from the original template.
templateInfo.main[*].table.detail.views array Defaults to [] on create; omitted on modify means retain, [] clears; saved as consumed by UI; the current API does not validate page/view existence or permissions.
Example: []
How to obtain or fill: Obtain from the original Resource Catalog tab configuration or built-in page/built-in view name.
templateInfo.main[*].table.detail.views[*] json Original display protocol; the server only retains it and does not render or test pages immediately.
Example: {"viewType": "component", "viewName": "base", "title": "详情", "required": false, "keys": {}, "timerange": "default"}
How to obtain or fill: Single detail tab configuration.
templateInfo.main[*].table.detail.views[*].title string Optional display text.
Example: 详情
How to obtain or fill: Tab display title specified by the caller.
templateInfo.main[*].table.detail.views[*].viewType string Use camelCase viewType; the old description view_type is not automatically converted here.
Example: component
How to obtain or fill: Actually supported built-in page component or built-in view dashboard.
templateInfo.main[*].table.detail.views[*].viewName string Cannot use arbitrary external URLs or dashboard UUIDs instead of a name; saving does not validate existence and does not guarantee display.
Example: base
How to obtain or fill: component takes a supported built-in page relative path, dashboard takes an existing built-in view name.
templateInfo.main[*].table.detail.views[*].required boolean Display convention: false displays by default, true is determined by keys matching; use a real JSON boolean, not the string "false". This API does not immediately validate matching.
Example: false
How to obtain or fill: UI option for whether to display the tab only when keys match.
templateInfo.main[*].table.detail.views[*].keys json Linked with required=true; field key mapping "*" means the field must exist, and a specific value means an equality combination; {} uses the UI default and does not serve as API authorization.
Example: {}
How to obtain or fill: Data field and value conditions of the displayed object.
templateInfo.main[*].table.detail.views[*].keys.字段名 JSON Can use an existing data value or the existence marker *; use according to the actual UI matching capability.
Example: *
How to obtain or fill: Actual object attribute key/matching value.
templateInfo.main[*].table.detail.views[*].timerange string or string array Display convention: default follows the platform Time Widget (not fixed at 15m); can be 15m/1h/1d, or [previous offset, later offset] such as [5m,30m] linked to data time. Saving does not validate the expression or execute a query.
Example: default
How to obtain or fill: Choose the time range based on detail-related query requirements.
templateInfo.main[*].table.detail.views[*].timerange[*] string Use m/h/d units, different from millisecond timeRange Query.
Example: 15m
How to obtain or fill: Previous/later duration in a two-element offset array.
sourceType string Y Publicly required, only object/custom_object; *_history sharing internal functions is not supported. On create, the actual value is taken from templateInfo.main[0].class; ensure it is consistent with this field; modify/read uses it to select configuration type. Public delete only supports custom_object and the controller fixes this type.
Allowed null: False
Optional values: ['object', 'custom_object']
Example: custom_object
How to obtain or fill: Choose object for system objects and custom_object for custom resource objects, according to the actual reported data source.
objcGroupUUID string Optional; on create/modify, an explicit empty string clears the group; omitted attempts template groupCfg.name, and if there is no name, empty string; on modify it is not retaining the original group. If non-empty, the group must exist in the current workspace. Although the list declares this field, the current implementation does not filter by it; do not rely on it to narrow results.
Allowed null: False
Allowed empty string: True
Maximum length: 64
Example:
How to obtain or fill: Obtain the objcg_ identifier from Resource Catalog group management in the current workspace or from objcGroupUUID of a list entry.
fields array Declared optional, but on create/when passed on modify, the request must contain name and no duplicates. Outer fields take precedence over the same-name template configuration; on modify, if both are omitted: if the target exists, retain fields; if the target does not exist, create fields=[] without validating name or synchronizing downstream filters; if the template provides them, use the template. Explicit [] is rejected because name is missing. Fields are synchronized to downstream reporting filter rules; data missing these required fields may be dropped, so verify with the collection side first.
Allowed null: False
Example: [{"name": "name", "alias": "资源名称"}]
How to obtain or fill: Take field names that must be included in actual reporting; back up main[0].fields from export and adjust.
templateInfo json Dynamic template object; on create, it must have a valid non-empty main and the first item must contain source.key (not declared required by the outer business, but omission may return 500); only main[0] is consumed, subsequent items are ignored. On modify, it can be omitted/{} to retain most configuration, but grouping is still handled according to the separate rules on this page.
Allowed null: False
Example: {}
How to obtain or fill: Prefer using the content configuration object from Resource Catalog export as the basis; do not backfill the entire unified response.

Additional Parameter Notes

Template configuration uses templateInfo.main[0], the table detail path is table.detail.views, and the field name is viewType. Parameters are expanded item by item in the table; dynamic template display information is saved without page rendering or query validation.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/objc_cfg/example_resources/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"sourceType":"custom_object","objcGroupUUID":"","fields":[{"name":"name","alias":"资源名称"}],"templateInfo":{"main":[{"class":"custom_object","source":{"key":"example_resources","name":"示例资源目录"},"groupCfg":{},"fields":[{"name":"name","alias":"资源名称"}],"filters":[{"key":"env"}],"groups":[],"fills":[],"table":{"columns":[{"key":"name"}],"detail":{"views":[]}}}],"title":"示例资源目录","summary":"","iconSet":{}}}'

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 Local configuration record number; may be null when constructing a response before a new submission.
content.uuid string Local objc_ configuration UUID, not category name.
content.workspaceUUID string Owning workspace.
content.sourceType string object/custom_object.
content.name string Actual category code.
content.alias string Display alias.
content.objcGroupUUID string Business group UUID; empty string if no group.
content.dashboardBindSet array Historical binding data; this entry does not separately parse/update this structure.
content.dashboardBindSet[] JSON Originally saved dynamic binding item.
content.fields object array Field definitions; if the target is missing and all fields are omitted, may be []; this branch does not update downstream filters.
content.fields[].name string Real reporting field name; must contain name, no duplicates, according to field naming rules.
content.fields[].alias string Optional display alias.
content.extend object Actually saved display configuration.
content.extend.iconSet object or null Dynamic icon configuration; may be null in historical/export data.
content.extend.iconSet.icon string Conditional icon identifier.
content.extend.iconSet.url string Conditional icon URL.
content.extend.filters object array Quick filter items.
content.extend.filters[].key string Filter field.
content.extend.groups array Dynamic display groups.
content.extend.groups[] JSON A single dynamic group item.
content.extend.fills array Dynamic fill configuration.
content.extend.fills[] JSON A single dynamic fill item.
content.extend.columns object array List display columns.
content.extend.columns[].key string Single column field key.
content.extend.tableDetailViews object array or object Detail tabs; may be {} for branches without a configured template.
content.extend.tableDetailViews[].title string Tab title.
content.extend.tableDetailViews[].viewType string component/dashboard.
content.extend.tableDetailViews[].viewName string Built-in page path or built-in view name.
content.extend.tableDetailViews[].required boolean Whether display is determined by keys.
content.extend.tableDetailViews[].keys object Dynamic matching fields/values.
content.extend.tableDetailViews[].keys.字段名 JSON Matching value/existence marker *.
content.extend.tableDetailViews[].timerange string or string array default/relative duration/previous and later offset array.
content.extend.tableDetailViews[].timerange[] string A single previous/later offset duration.
content.status integer Normal 0, deleted 3.
content.creator string Creator.
content.updator string Updater.
content.createAt integer Creation Unix seconds.
content.updateAt integer or number Update Unix seconds; historical data may be compatible with small decimal values.
content.deleteAt integer -1 if not deleted.
content.declaration object or null Workspace shared declaration attached to a non-empty business object; may be null or an empty object when not configured; an empty object is not added.
{
  "code": 200,
  "content": {
    "id": null,
    "uuid": "objc_example",
    "workspaceUUID": "wksp_example",
    "sourceType": "custom_object",
    "name": "example_resources",
    "alias": "示例资源目录",
    "objcGroupUUID": "",
    "dashboardBindSet": [],
    "fields": [
      {
        "name": "name",
        "alias": "资源名称"
      }
    ],
    "extend": {
      "iconSet": {},
      "columns": [
        {
          "key": "name"
        }
      ],
      "filters": [
        {
          "key": "env"
        }
      ],
      "groups": [],
      "fills": [],
      "tableDetailViews": []
    },
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427200,
    "deleteAt": -1,
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

Only configurations in the workspace of the current API Key can be modified/exported. The list can count authorized target workspaces, but their display configuration remains the current workspace. The API has a freeEdition version declaration; public OpenAPI authentication does not perform this version check in this route, so do not write the version itself as a fixed 403. Upstream 4xx queries are mapped according to actual Kodo/permissions; ordinary 5xx ultimately returns 500 ft.InternalServerError.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed Request field missing, or field value violates declared validation conditions Parameter parsing failed Check parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Correct the JSON according to content.reason, line, column.
400 ft.JsonFormatError Body top level is not a JSON object Some json file format errors Submit an object containing the fields on this page.
400 ft.InvalidFieldName A field name in the final fields does not match the regex Invalid field name (starts with a letter and contains only letters and underscores) Use a name that starts with a letter and is at least 2 characters of letters/digits/_; submit an object, not a string.
400 ft.MissingFiledName Explicit outer or template fields missing name (including explicit []); both omitted does not trigger this check Must contain name field Retain name and all fields actually required for reporting; back up the complete definition before modifying.
400 ft.UnsupportRepeatfield Duplicate names in fields Duplicate fields are not allowed Deduplicate fields by name; do not treat different aliases as different fields.
406 ft.InvalidObjcSetClassName Category name empty/invalid format Object category name {} is invalid Get name from existing category list; create requires templateInfo.main[0].source.key non-empty; avoid leading/trailing whitespace.
404 ft.NotFoundObjcGroupObj Explicit non-empty objcGroupUUID is not a non-deleted group in the current workspace Specified Resource Class group not found Use an actual group UUID; to clear the group, explicitly use an empty string.
500 ft.InternalServerError Dynamic template/field element shape, storage length, existing group compatibility branch, or post-submission filter synchronization failed Internal error First read list/export to verify configuration and downstream filter status; it may already be saved, do not blindly recreate. For existing groups, explicitly provide the UUID.

Feedback

Is this page helpful?