Skip to content

Get



GET /api/v1/workspace/declaration/get

Overview

Read the current workspace attribute claims and, when necessary, trigger a background sync of organization information.

Before You Call and Usage Steps

Use the API key of the target workspace. The workspace is determined by the key; do not pass workspaceUUID separately in the query or body. Workspace claims are key-value configurations used for business identification and return display, not an interface for data access authorization, billing organization migration, or resource renaming.

Read the claim keys at the top level of content. For non-empty objects, the common OpenAPI response also appends content.declaration (the common claims in the workspace cache). This is not another layer of business object added by this page; do not write the entire response envelope or this auxiliary field back as-is. If a legacy configuration itself uses a key named declaration, its original value may be returned. It is recommended that custom keys avoid reserved meanings such as declaration/organization/business/data/pageInfo. If a legacy custom field contains both data and pageInfo, the common wrapper moves pageInfo to the top level of the response; this does not indicate API pagination, and the moved field must not be discarded and then written back blindly. An empty claims object may return {}. Legacy non-paid configurations may also be null. There is no guarantee that business or organization is always present.

pay/enterprise workspaces attempt to fill in the organization in real time. If this fails, the saved value may be retained. When there is a difference, a background sync is also triggered, so this GET is not completely free of side effects. The background sync does not provide a task ID or completion progress in this response. If the asynchronous queue is unavailable, the read may also return 500. Other versions return the saved claims directly and are not guaranteed to perform the same completion. Business string display must be read according to the actual response; do not treat business as a fixed array.

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 operation permissions from API Key Management in the target workspace.

Request Example

curl --get 'https://openapi.guance.com/api/v1/workspace/declaration/get' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

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

Field Type Description
content object or null Claims key-value object. An empty configuration may be {}; some legacy non-paid records may be null.
content.organization string or null System-maintained organization identifier; may be omitted. In paid/Enterprise editions, it is obtained from organization profile data. In the Deployment Plan, modifications are saved as default_private_organization. It is not equal to the workspace UUID, and this API cannot be used to specify a target organization.
content.business any legacy JSON value Business attribute; may be omitted. For pay/enterprise, reads and current modifications are normalized to a string. Non-paid GET requests may return legacy arrays/null, etc. as-is, so it should not be parsed as a fixed string.
content.{custom key} any legacy JSON value User-defined key; read using the actual key. Current modifications convert non-string values to JSON strings; legacy saved values may still have other types.
pageInfo any legacy JSON value Moved to the top level by the common wrapper only when the claims originally contained both data and pageInfo; this is not pagination for this API.
content.declaration any JSON value (object, null, or legacy custom value) If the claims object itself already has a key named declaration, its original value is retained (including strings, arrays, etc.); the workspace common claims are appended only when this key is absent.
{
  "code": 200,
  "content": {
    "organization": "organization_example",
    "business": "checkout",
    "costCenter": "platform",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

Common authentication, allowlist, and rate limiting errors are described in Common Error Definitions. When reading live organization profile data fails, the saved value is used as a fallback first; do not treat every upstream organization error as a failure of this API. Subsequent asynchronous delivery errors may still result in 500.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
401 ft.WKSPNotExistOrReleased The workspace referenced by the API key has no valid record or has been released Workspace does not exist or has been released Check the key ownership and workspace status.
500 ft.InternalServerError Incompatible claims storage format, read failure, or failure to deliver an asynchronous sync task Internal error Retain the traceId and contact the administrator. Read again later. Do not infer from this result that the background task has completed.

Feedback

Is this page helpful?