Export¶
GET /api/v1/objc_cfg/{objc_name}/export
Overview¶
Export a single Resource Catalog configuration as a JSON template.
Prerequisites and Usage Steps¶
The route permission must match one of routine.defaultAccess, anonymous.shared, or anonymous.snapshotShared. This API does not query object data, so there is no need to request infrastructure.Query additionally for this export.
GET returns a JSON content configuration, not a CSV, file stream, or asynchronous download. Use the template object for templateInfo; do not backfill the entire unified response. Prefer the current workspace configuration; otherwise fall back to the site template according to the workspace language. If neither matches, a minimal template synthesized from the requested category name may still be returned; a 404 or data in the original category is not guaranteed.
Local configuration exports groupCfg.name. When importing to another workspace, determine the group UUID first to avoid name compatibility errors. System templates may retain extra metadata and multiple main items. For uploaded custom system templates, source may still be a legacy string/array; before populating, convert it into an object containing key (and optionally name), and verify dynamic fields item by item. Public create/modify operations consume only the first item. This page is read-only; it does not perform deletion or reported field synchronization.
Route Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| objc_name | string | Y | Required in the delete body; path export/modify 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. Example: example_resourcesHow to obtain or enter: Get the category code from content[].name in the Resource Catalog List; it is not the objc_ configuration UUID or alias. |
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 permission from API Key Management in the target workspace. |
Query Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| sourceType | string | Y | Required for public APIs; only object/custom_object are supported; the *_history of shared internal functions is not supported. Creation actually uses templateInfo.main[0].class, which must be consistent with this field; modification/read uses it to select the configuration type. Public deletion supports only custom_object, and the controller fixes this type. Null allowed: False Allowed values: ['object', 'custom_object'] Example: custom_objectHow to obtain or enter: Select object for system objects and custom_object for custom resource objects, based on the actual reported data source. |
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/objc_cfg/example_resources/export' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode sourceType=custom_object
Response¶
HTTP 200, application/json. The following example shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.main | Object array | Template array that can be used to populate create/modify operations; locally synthesized templates are usually a single item, while system templates may retain the original array. |
| content.main[].class | string | object/custom_object data type. |
| content.main[].source | object or string or array | Category locator and display name; local configuration is synthesized as an object, while uploaded custom system templates may retain legacy strings/arrays; normalize them into objects containing key before populating. |
| content.main[].source.key | string | Actual category name when source is an object; may be omitted in legacy string/array branches. |
| content.main[].source.name | string | Conditional alias when source is an object; when not configured during local synthesis, falls back to the category name; may be omitted in legacy templates. |
| content.main[].Other template fields | JSON | Custom uploaded system templates may retain dynamically extended fields and the original structure; populate only the fields consumed by create/modify on this page, and do not treat unrecognized fields as saved or validated. |
| content.main[].groupCfg | object | Business group export configuration; {} when there is no group. |
| content.main[].groupCfg.name | string | Name when a group exists; not the UUID. |
| content.main[].fields | Object array | Field definitions. |
| content.main[].fields[].name | string | Actual reported field name; must contain name, must be unique, and must follow field naming rules. |
| content.main[].fields[].alias | string | Optional display alias. |
| content.main[].filters | Object array | Quick filters. |
| content.main[].filters[].key | string | Filter field. |
| content.main[].groups | array | Dynamic display groups. |
| content.main[].groups[] | JSON | Original dynamic group item. |
| content.main[].fills | array | Dynamic fill configuration. |
| content.main[].fills[] | JSON | Original dynamic fill item. |
| content.main[].table | object | List/detail views. |
| content.main[].table.columns | Object array | List columns. |
| content.main[].table.columns[].key | string | Column field. |
| content.main[].table.detail | object | Detail configuration. |
| content.main[].table.detail.views | Object array | Tab configuration. |
| content.title | string | Alias/category name; system templates use the original value. |
| content.summary | string | Empty string for local synthesis; system templates use the original value. |
| content.iconSet | object or null | Icon; can be null when no value is available. |
| content.iconSet.icon | string | Conditional icon identifier. |
| content.iconSet.url | string | Conditional icon resource URL. |
| content.declaration | object or null | Workspace public declaration attached to non-empty business objects; when not configured, it can be null or an empty object; empty objects are not added. |
| content.main[].table.detail.views[].title | string | Tab title. |
| content.main[].table.detail.views[].viewType | string | component/dashboard. |
| content.main[].table.detail.views[].viewName | string | Built-in page path or built-in view name. |
| content.main[].table.detail.views[].required | boolean | Whether display is determined by keys. |
| content.main[].table.detail.views[].keys | object | Dynamically matched field/value. |
| content.main[].table.detail.views[].keys.fieldName | JSON | Match value/existence marker *. |
| content.main[].table.detail.views[].timerange | string or string array | default/relative duration/array of before-and-after offsets. |
| content.main[].table.detail.views[].timerange[] | string | Single before/after offset duration. |
{
"code": 200,
"content": {
"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": null,
"declaration": {}
},
"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 associated with the current API Key can be modified/exported. The list can count authorized target workspaces, but its display configuration still comes from the current workspace. The endpoint has a freeEdition version declaration. Public OpenAPI authentication does not perform this version check on this route; do not document the version itself as a fixed 403. Upstream 4xx responses during queries are mapped according to the actual Kodo/permission mapping; ordinary 5xx responses ultimately become 500 ft.InternalServerError.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Request field is missing, or the field value violates the declared validation conditions | Parameter parsing failed | Verify the parameter location, field name, type, and value. |
| 404 | ft.NotFoundObjcGroupObj | The business group referenced by the local configuration no longer exists | The specified resource category group was not found | Check the group association for this directory and fix it before exporting again; if the directory itself is not found, this error is not guaranteed to be returned. |
| 500 | ft.InternalServerError | An uncaught exception occurs while reading a single directory configuration, system template, or associated group, or while formatting for export | Internal error | Check the historical configuration, template structure, and group association for this category, retain traceId, and retry a limited number of times; this page is read-only and does not write this configuration. |