Delete¶
POST /api/v1/objc_cfg/delete
Overview¶
Delete downstream data for the specified custom object category.
Before Calling and Usage Steps¶
This API requires the API Key to have the infrastructure.setManage permission.
The actual call is POST /objc_cfg/delete; the Body sourceType must be custom_object; the controller fixes this type and does not support deleting system object configurations. objc_name uses the actual category name, not the configuration UUID/display alias.
This public implementation only requests downstream deletion of data in the custom_object category. It has no logic to soft-delete the local ObjcCfg, clean up menus, or delete site templates. Do not interpret true as meaning the catalog display configuration is also removed, and it does not return the actual number of deleted records. Data deletion is irreversible; first confirm backups and the subsequent reporting behavior of the collectors. Continued reporting may cause the category to reappear.
A successful downstream deletion returns true. For timeouts/500, first verify the actual data; do not assume the deletion did not occur, and do not blindly retry.
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 this operation permission from API Key Management in the target Workspace. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| sourceType | string | Y | This public delete API supports only custom_object and cannot delete configurations of the system object type.Allows null: False Allowed values: ['custom_object'] Example: custom_objectHow to obtain or enter: Enter custom_object, and verify the category to delete from this Workspace's custom Resource Catalog list. |
| objc_name | string | Y | Required in the delete Body; path export/modification uses the same category name. The name must be consistent with the reported class, and the path must be URL-encoded. The alias only controls display and is not used as the target name.Allows null: False Example: example_resourcesHow to obtain or enter: Obtain the category code from Resource Catalog list content[].name, not the objc_ config UUID or alias. |
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/objc_cfg/delete' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"sourceType":"custom_object","objc_name":"example_resources"}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | boolean | true when the call is processed successfully; not the deletion count or per-item result. |
{
"code": 200,
"content": true,
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
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 configurations still belong to the current Workspace. The API has a freeEdition version declaration; public OpenAPI authentication does not perform this version check on this route, so do not hard-code the version itself as a fixed 403. Query upstream 4xx is mapped according to the actual Kodo/permission; ordinary 5xx ultimately becomes 500 ft.InternalServerError.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | A request field is missing, or a field value violates the declared validation conditions | Parameter parsing failed | Verify the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | The request JSON syntax is invalid | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | The top level of the Body is not a JSON object | Some JSON file format error | Submit an object that contains the fields on this page. |
| 500 | ft.InternalServerError | Downstream deletion fails/times out, or an uncaught exception occurs while processing the response | Internal error | Verify the actual data status by category name and retain the traceId; this API does not clean up local display configurations, so do not judge data deletion as failed just because items still appear in the list. |