Skip to content

Set Workspace Menu (Legacy)



POST /api/v1/workspace/menu/set

Overview

Save the workspace menu according to the legacy first-level protocol.

Before You Call and Usage Steps

  1. Use an API Key with the workspace.setManage permission in the current workspace, and first read the legacy menu configuration.
  2. Keep the legacy menu items that are allowed to be submitted, then submit the complete configuration after changing the order or visibility; legacy nodes that are not submitted are restored to the default display.
  3. Check the menu result based on the returned configuration and the role actually in use; when you need catalogs, resources, and concurrent version control, prefer the v3 menu API.

Use a Key of the current workspace that has workspace.setManage. Legacy-compatible saves go through the same workspace transaction lock as v3; system nodes are only reordered and their visibility set within the range expressible by the legacy protocol, while v3 custom catalog/resource/role configurations are preserved. Legacy nodes that are not listed are restored to the default display; this is not a patch that modifies only one item in the array. Therefore, read the complete legacy configuration first, then modify it.

v1 cannot express second-level visibility; on save, legacy second-level menus in that range are restored to the default display according to historical rules. New clients should use v3.

The legacy protocol does not require expectedRevision and may overwrite visibility changes made by other editors within its expressible range; prefer v3 for concurrent editing. Save returns the legacy two-level projection (including the v1 write entry point), not a value array matching the request shape. updated=true does not mean the content definitely changed; menu audit is recorded per route only when there is a change. The first save may persist and increase the revision even if the content is identical to the default.

v1 writes only submit the legacy Keys enumerated in the parameter table; GET may contain new Keys such as Notebook, so you cannot return all GET items directly. Filter to the allowed legacy range; menus outside the new range keep their original configuration.

When accepting with an Owner identity, note that effective menu calculation ignores workspace isShow hiding (except for dividers), but is still constrained by platform hiding and actual permissions; the final display for regular roles and the Owner may differ.

This legacy write response does not merge platform hiding configuration, so the returned isHide cannot be used to verify real platform visibility; after saving, verify against the corresponding GET and the menus of the actual role.

Request Headers

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

Body Request Parameters

Parameter Name Type Required Description
menu array Y Required complete array of the legacy protocol range. Omitted legacy system nodes are restored to the default display; an empty array does not disable all menus. v3 custom object/role configurations that are not expressed are preserved.
Null allowed: False
Example: [{"key": "LogIndi", "value": 0}]
How to obtain or fill: First read content.config from the GET of the corresponding version, remove the returned metadata, and construct the fields according to this page.
menu[*] json Y Object; duplicate keys are rejected; resource authorization cannot be created in the legacy protocol.
Null allowed: False
Example: {"key": "LogIndi", "value": 0}
How to obtain or fill: Use a single system item returned by the legacy GET.
menu[*].key string Y Required Key, case-sensitive. v1 supports only the originally declared enumeration; v2 is compatible with unknown/retired Keys but does not add an accessible v3 entry based on them.
Null allowed: False
Allowed values: ['Scene', 'Events', 'ExceptionsTracking', 'Objectadmin', 'MetricQuery', 'LogIndi', 'Tracing', 'Rum', 'CloudDial', 'Security', 'GitLabCI', 'Monitor', 'Integration', 'Workspace', 'Billing']
Example: LogIndi
How to obtain or fill: Take the original value from content.config[].key of the legacy GET.
menu[*].value int Y Required JSON integer, only 0/1 allowed; booleans or strings are not accepted.
Null allowed: False
Allowed values: [0, 1]
Example: 0
How to obtain or fill: 0 hides, 1 shows.

Additional Parameter Notes

Parameter Description

Parameter Name type Required Description
menu array[json] Y Menu bar list
key string Y Menu item
value int Y Whether enabled: 0 not enabled, 1 enabled

Menu Item Description

key Description
Scene Scenes
Events Events
ExceptionsTracking Incident
Objectadmin Infrastructure
MetricQuery Metrics
LogIndi Logs
Tracing APM
Rum RUM
CloudDial Synthetic Monitoring
Security Security Check
GitLabCI CI Visualization
Monitor Monitoring
Integration Integration
Workspace Manage
Billing Plans & Billing

Note:
1. If not configured, the frontend treats it as a new menu and it is enabled by default
2. Menu configurations present in the management backend affect the final display of the workspace configuration

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/workspace/menu/set' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"menu":[{"key":"LogIndi","value":0}]}'

Response

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

Field Type Description
content.workspaceUUID string UUID of the workspace that the current Key belongs to.
content.config array<object> Menu configuration array; an empty result may also be [].
content.keyCode string Compatibility metadata; the save/v3 compatibility projection is usually WsMenuCfg; the legacy read branch of a new workspace may omit it.
content.updated boolean Usually true when a workspace configuration or v3 compatibility projection exists; it is not a reliable indicator of whether this write changed anything, and new workspaces may omit it.
content.id integer or null Database ID of the saved configuration; may be omitted.
content.uuid string ctcf_ configuration UUID; may be omitted and is not used as a menu node ID.
content.creator string Identity that created the configuration; may be omitted.
content.updator string Identity that modified the configuration; may be omitted.
content.status integer Status of the configuration entity; may be omitted.
content.createAt integer Creation Unix seconds; may be omitted.
content.updateAt integer Update Unix seconds; may be omitted.
content.deleteAt integer Deletion Unix seconds, -1 if not deleted; may be omitted.
content.declaration object or null Workspace public declaration attached to non-empty content; may be null or an empty object when not configured.
content.config[].key string First-level system menu Key; returned as-is; dynamic catalogs and resources are not part of this legacy projection.
content.config[].isShow boolean Whether the workspace configuration shows it; does not override mandatory platform hiding or actual permissions.
content.config[].isHide boolean Legacy protocol compatibility field; this write response does not merge site platform hiding configuration, and known system items are usually false. Actual display should also be read from the corresponding GET or effective menus; this cannot be used to determine whether the platform hides it.
content.config[].children array<object> Second-level system menu array; may be [].
content.config[].children[].key string Second-level menu Key; the parent-child combination determines the identity.
content.config[].children[].isShow boolean Whether the workspace shows the submenu.
content.config[].children[].isHide boolean Legacy protocol compatibility field; this write response does not merge site platform hiding configuration, and known system items are usually false. Actual display should also be read from the corresponding GET or effective menus; this cannot be used to determine whether the platform hides it.
content.config[].menuGroupKey string Historical site grouping metadata; may be omitted.
content.config[].groupKey string Historical grouping alias; may be omitted.
content.config[].navGroupKey string Historical navigation grouping alias; may be omitted.
{
  "code": 200,
  "content": {
    "id": 101,
    "uuid": "ctcf_menu_example",
    "workspaceUUID": "wksp_example",
    "keyCode": "WsMenuCfg",
    "config": [
      {
        "key": "Scene",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "DashboardList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ViewerList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "BuiltInViewList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LinkToTrackService",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "RegularReportList",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Notebook",
        "isShow": true,
        "isHide": false,
        "children": []
      },
      {
        "key": "Events",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "KeyEventsMonitor",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "KeyEventsMonitorChart",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogBackupExplorer",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "ExceptionsTracking",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "Exceptions",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "AnalysisDashboard",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ExceptionsSchedule",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ExceptionsTrackingConf",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CrossWorkspace",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Incident",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "IncidentList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "IncidentDashboard",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "IncidentSchedule",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "IncidentConfig",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Error",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "ErrorList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ErrorDashboard",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Objectadmin",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "ObjectadminHost",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ObjectadminDocker",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ObjectadminProcesses",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ObjectadminDatabase",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "HostNetwork",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ObjectadminOther",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspacePipelineList",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Entity",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "EntityList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "EntityTopology",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "DataObservability",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "DataObservabilityOverview",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataObservabilityCatalog",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataObservabilityJobs",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataObservabilityLineage",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "MetricQuery",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "MetricAnalysis",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "MetricMap",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "MetricIndicator",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspacePipelineList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataAccessRuleList",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "LogIndi",
        "isShow": false,
        "isHide": false,
        "children": [
          {
            "key": "Log",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogTrackError",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogPipelineList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogIndexList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogFilterRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogBackupExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogQueryRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "MetricIndicator",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Tracing",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "LinkToTrackService",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LinkToTrackDashboard",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LinkToTrackLink",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LinkToTrackError",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LinkToTrackProfile",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogBackupExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataAccessRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "MetricIndicator",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspacePipelineList",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Rum",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "RumList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "RumViewer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "RumDashboard",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "RumHeatMap",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "RumTrack",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogBackupExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataAccessRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "MetricIndicator",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspacePipelineList",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "CloudBilling",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "ColudBillingExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ColudBillingDashboard",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CloudBillingBudget",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "CloudDial",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "CloudDialList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CloudDialDashboard",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CloudDialExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CloudDialSelfNodeList",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Security",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "SecuritySIEMRules",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "SecuritySIEMExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "SecuritySIEMExecutionLogs",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "AIMonitor",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "AIMonitorList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "AIMonitorExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "AIMonitorEvaluator",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "AIMonitorDashboard",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "GitLabCI",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "GitLabCIExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "GitLabCIDashboard",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Monitor",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "CheckerRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "AICheckerRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "SmartCheckerRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "SLOList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "SilenceList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CheckerRuleGroupList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "AlertToList",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Integration",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "IntegrationList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "Datakit",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "GatewayAccess",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ImApplication",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "FunctionDetail",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CloudAccountList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ExternalDataSourceList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DCA",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "Mobile",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Workspace",
        "isShow": true,
        "isHide": false,
        "children": [
          {
            "key": "WorkspaceDetail",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceAttrDetail",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceFieldsList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceTagsList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceEnvsList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceMembers",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceRoles",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "APIManage",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ClientToken",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "MemberInviteList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceFilterRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspacePipelineList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "LogBackupExplorer",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataAccessRuleList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "RegexpList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "KeyEventsAudit",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "EmbeddedSharing",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "CrossNamespacedataAuth",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataAuthorization",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "DataScanerList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "WorkspaceCopilotSubscription",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "ErrorCenterList",
            "isShow": true,
            "isHide": false
          },
          {
            "key": "Labs",
            "isShow": true,
            "isHide": false
          }
        ]
      },
      {
        "key": "Billing",
        "isShow": true,
        "isHide": false,
        "children": []
      }
    ],
    "updated": true,
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427300,
    "deleteAt": -1,
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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 a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON top level is not an object Some JSON file format error Submit an object as shown in the example.
400 ft.ParamsValidateError The menu node/role configuration violates structure, identity, type, size, scope, or duplicate constraints Parameter validation failed: {} Locate the issue based on error content.reason/path, then read the latest tree and roles/resources and fix it.
401 ft.WKSPNotExistOrReleased The current workspace does not exist or is not in an active state Workspace does not exist/or has been released Confirm that the current workspace is valid and use the Key of the corresponding workspace.
500 ft.InternalServerError Configuration persistence or response handling failed Internal error Re-read the complete configuration to check the revision and the result, merge the changes, and then save again to avoid overwriting concurrent modifications.

Feedback

Is this page helpful?