Skip to content

Import Cross-Site Grant meta



POST /api/v1/workspace_data/cross_site_grant/meta/import

Overview

Import the complete signed package on the grantee side to complete source authentication and establish a local active mirror.

Prerequisites and Usage Steps

Use an API Key with the dataRightsManage.workspaceConfigManage permission; the workspace is determined by the Key. The grantor is the data-providing workspace, and the grantee is the target workspace that queries the data; the two must be different workspaces. For the Deployment Plan, first follow Deployment Plan Cross-Site Grant Usage Instructions to configure the version, local site identity, certificates, and allowed cross-site relationships. The private key is retained by the administrator on the server and is not included in the request/grant package.

On the grantee site, use the target workspace's Key to submit {meta: complete grant package}. First verify the package source, targetWorkspaceUUID, expiration time, and grant scope; the current public Body accepts only meta and does not support the controller-internal authResult or spreading individual meta fields directly at the top level of the request. Read content.meta returned by Generate meta and pass it through completely as a file; do not submit the illustrative public key/JWS on this page, and do not add a private key.

After verifying the package, the target server actively initiates authentication with the grantor (default request timeout: 10 seconds; configurable per site). The grantor does not actively connect to the target. The target server must be able to access the grantor address in the package, not just the caller's computer. The corresponding cross-site relationship on both sides must be enabled. Same-organization targets also require valid official site information; for same-site workspace grants, use in-site grants.

Only after an active mirror is successfully established locally can the grant enter the grant selection and query path. Authentication exchange and local storage are submitted at the two ends separately; a failure may have already activated the source side and consumed the temporary code, so do not assume the original package can be replayed indefinitely. For the same valid mirror, a duplicate error is usually returned before the remote exchange; duplicated=true only applies to a specific existing-record reuse branch and does not provide an idempotent retry guarantee. On failure, first check the Grant Record List at both ends separately, and then decide whether to restore, revoke, or rebuild.

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.

Body Request Parameters

Parameter Type Required Description
meta.version string Generated protocol version; currently 2026-05-27. Keep the original value.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from version in the real grant package; do not construct it yourself.
meta.metaUUID string Identifier of this grant package, used for subsequent exchanges.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from metaUUID in the real grant package; do not construct it yourself.
meta.createdAt integer Generation time, in Unix seconds.
Example: 1785427200
How to obtain or enter: Obtain the original value from createdAt in the real grant package; do not construct it yourself.
meta.expireAt integer Grant package expiration time, in Unix seconds; import must be completed before this time.
Example: 1785427200
How to obtain or enter: Obtain the original value from expireAt in the real grant package; do not construct it yourself.
meta.sourceWorkspace object Data grantor workspace information.
Example: {}
How to obtain or enter: Obtain the original value from sourceWorkspace in the real grant package; do not construct it yourself.
meta.sourceWorkspace.workspaceUUID string Grantor workspace UUID, determined by the source API Key.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceWorkspace.workspaceUUID in the real grant package; do not construct it yourself.
meta.sourceWorkspace.workspaceName string Snapshot of the source workspace name; may be empty.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceWorkspace.workspaceName in the real grant package; do not construct it yourself.
meta.targetWorkspaceUUID string Grantee workspace UUID; must equal the workspace of the Key used for import.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from targetWorkspaceUUID in the real grant package; do not construct it yourself.
meta.sourceSite object Grantor site identity and access address, provided by the server; do not fill it in yourself or replace the brand/domain.
Example: {}
How to obtain or enter: Obtain the original value from sourceSite in the real grant package; do not construct it yourself.
meta.sourceSite.siteCode string Grantor site code.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.siteCode in the real grant package; do not construct it yourself.
meta.sourceSite.regionCode string Grantor region code; pass the original value from the package.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.regionCode in the real grant package; do not construct it yourself.
meta.sourceSite.name string Site display name.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.name in the real grant package; do not construct it yourself.
meta.sourceSite.issuer string Grantor signing identity.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.issuer in the real grant package; do not construct it yourself.
meta.sourceSite.baseUrl string Base URL of the grantor API that the importer server actively requests; it must be provided by a trusted grantor and be reachable.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.baseUrl in the real grant package; do not construct it yourself.
meta.sourceSite.jwksUri string URL of the grantor's public key information.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.jwksUri in the real grant package; do not construct it yourself.
meta.sourceSite.kid string Identifier of the current active signing Key.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.kid in the real grant package; do not construct it yourself.
meta.sourceSite.publicKeys array<object> Public key set filtered by the server, excluding private keys.
Example: []
How to obtain or enter: Obtain the original value from sourceSite.publicKeys in the real grant package; do not construct it yourself.
meta.sourceSite.publicKeys[*] object A public key information entry.
Example: {}
How to obtain or enter: Obtain the original value from sourceSite.publicKeys[*] in the real grant package; do not construct it yourself.
meta.sourceSite.publicKeys[*].kid string Corresponding public key identifier.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.publicKeys[*].kid in the real grant package; do not construct it yourself.
meta.sourceSite.publicKeys[*].publicKey string PEM public key body, not a private key or API Key.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from sourceSite.publicKeys[*].publicKey in the real grant package; do not construct it yourself.
meta.grantScope object Normalized grant scope.
Example: {}
How to obtain or enter: Obtain the original value from grantScope in the real grant package; do not construct it yourself.
meta.grantScope.type array<string> Array of data categories.
Example: []
How to obtain or enter: Obtain the original value from grantScope.type in the real grant package; do not construct it yourself.
meta.grantScope.type[*] string A category or *.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.type[*] in the real grant package; do not construct it yourself.
meta.grantScope.indexes array<string> Array of log index names; may be [] for non-log grants.
Example: []
How to obtain or enter: Obtain the original value from grantScope.indexes in the real grant package; do not construct it yourself.
meta.grantScope.indexes[*] string Index name or *.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.indexes[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions object Four types of filter conditions; the structure is consistent with conditions in the generate request and must be retained completely.
Example: {}
How to obtain or enter: Obtain the original value from grantScope.conditions in the real grant package; do not construct it yourself.
meta.auth object Temporary authentication information for this exchange; it should be passed securely to the grantee.
Example: {}
How to obtain or enter: Obtain the original value from auth in the real grant package; do not construct it yourself.
meta.auth.tempAuthCode string 32-character lowercase hexadecimal temporary code used for one exchange; pass it through completely after generation; it is not a long-term API Key.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from auth.tempAuthCode in the real grant package; do not construct it yourself.
meta.auth.tempAuthCodeExpireAt integer Temporary code expiration time, in Unix seconds; both this and the package validity period must be satisfied.
Example: 1785427200
How to obtain or enter: Obtain the original value from auth.tempAuthCodeExpireAt in the real grant package; do not construct it yourself.
meta.security object Signing algorithm and Key information.
Example: {}
How to obtain or enter: Obtain the original value from security in the real grant package; do not construct it yourself.
meta.security.signAlg string Currently RS256.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from security.signAlg in the real grant package; do not construct it yourself.
meta.security.kid string Identifier of the Key that generated the signature.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from security.kid in the real grant package; do not construct it yourself.
meta.signature string Complete JWS signature; do not import using the example placeholder value.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from signature in the real grant package; do not construct it yourself.
meta.grantScope.conditions.metric array Optional condition array; omitted or [] means no additional conditions are added for this category, which does not mean the category is prohibited.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.metric in the real grant package; do not construct it yourself.
meta.grantScope.conditions.metric[*] object Each item must be an object; do not use a string or null instead.
Example: {}
How to obtain or enter: Obtain the original value from grantScope.conditions.metric[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions.metric[*].name string Matching field name, not a display alias. Current creation validation does not fully verify that the field exists; verify the scope with controlled data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.metric[*].name in the real grant package; do not construct it yourself.
meta.grantScope.conditions.metric[*].op string Only in for inclusion and not in for exclusion are supported; symbols such as = are not supported.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.metric[*].op in the real grant package; do not construct it yourself.
meta.grantScope.conditions.metric[*].logic string Mixing within the same category returns 406; unknown logic is not fully rejected, so clients should fill in only and/or and must not rely on permissive branches.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.metric[*].logic in the real grant package; do not construct it yourself.
meta.grantScope.conditions.metric[*].value array Must be an array; element values should match the actual field, and do not use a comma-separated string instead of an array.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.metric[*].value in the real grant package; do not construct it yourself.
meta.grantScope.conditions.metric[*].value[*] Actual field value A value to match; the type and case should be consistent with the data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.metric[*].value[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions.tracing array Optional condition array; omitted or [] means no additional conditions are added for this category, which does not mean the category is prohibited.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.tracing in the real grant package; do not construct it yourself.
meta.grantScope.conditions.tracing[*] object Each item must be an object; do not use a string or null instead.
Example: {}
How to obtain or enter: Obtain the original value from grantScope.conditions.tracing[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions.tracing[*].name string Matching field name, not a display alias. Current creation validation does not fully verify that the field exists; verify the scope with controlled data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.tracing[*].name in the real grant package; do not construct it yourself.
meta.grantScope.conditions.tracing[*].op string Only in for inclusion and not in for exclusion are supported; symbols such as = are not supported.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.tracing[*].op in the real grant package; do not construct it yourself.
meta.grantScope.conditions.tracing[*].logic string Mixing within the same category returns 406; unknown logic is not fully rejected, so clients should fill in only and/or and must not rely on permissive branches.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.tracing[*].logic in the real grant package; do not construct it yourself.
meta.grantScope.conditions.tracing[*].value array Must be an array; element values should match the actual field, and do not use a comma-separated string instead of an array.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.tracing[*].value in the real grant package; do not construct it yourself.
meta.grantScope.conditions.tracing[*].value[*] Actual field value A value to match; the type and case should be consistent with the data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.tracing[*].value[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions.rum array Optional condition array; omitted or [] means no additional conditions are added for this category, which does not mean the category is prohibited.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.rum in the real grant package; do not construct it yourself.
meta.grantScope.conditions.rum[*] object Each item must be an object; do not use a string or null instead.
Example: {}
How to obtain or enter: Obtain the original value from grantScope.conditions.rum[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions.rum[*].name string Matching field name, not a display alias. Current creation validation does not fully verify that the field exists; verify the scope with controlled data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.rum[*].name in the real grant package; do not construct it yourself.
meta.grantScope.conditions.rum[*].op string Only in for inclusion and not in for exclusion are supported; symbols such as = are not supported.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.rum[*].op in the real grant package; do not construct it yourself.
meta.grantScope.conditions.rum[*].logic string Mixing within the same category returns 406; unknown logic is not fully rejected, so clients should fill in only and/or and must not rely on permissive branches.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.rum[*].logic in the real grant package; do not construct it yourself.
meta.grantScope.conditions.rum[*].value array Must be an array; element values should match the actual field, and do not use a comma-separated string instead of an array.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.rum[*].value in the real grant package; do not construct it yourself.
meta.grantScope.conditions.rum[*].value[*] Actual field value A value to match; the type and case should be consistent with the data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.rum[*].value[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions.lineage array Optional condition array; omitted or [] means no additional conditions are added for this category, which does not mean the category is prohibited.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.lineage in the real grant package; do not construct it yourself.
meta.grantScope.conditions.lineage[*] object Each item must be an object; do not use a string or null instead.
Example: {}
How to obtain or enter: Obtain the original value from grantScope.conditions.lineage[*] in the real grant package; do not construct it yourself.
meta.grantScope.conditions.lineage[*].name string Matching field name, not a display alias. Current creation validation does not fully verify that the field exists; verify the scope with controlled data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.lineage[*].name in the real grant package; do not construct it yourself.
meta.grantScope.conditions.lineage[*].op string Only in for inclusion and not in for exclusion are supported; symbols such as = are not supported.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.lineage[*].op in the real grant package; do not construct it yourself.
meta.grantScope.conditions.lineage[*].logic string Mixing within the same category returns 406; unknown logic is not fully rejected, so clients should fill in only and/or and must not rely on permissive branches.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.lineage[*].logic in the real grant package; do not construct it yourself.
meta.grantScope.conditions.lineage[*].value array Must be an array; element values should match the actual field, and do not use a comma-separated string instead of an array.
Example: []
How to obtain or enter: Obtain the original value from grantScope.conditions.lineage[*].value in the real grant package; do not construct it yourself.
meta.grantScope.conditions.lineage[*].value[*] Actual field value A value to match; the type and case should be consistent with the data.
Example: <Keep the grantor's original value>
How to obtain or enter: Obtain the original value from grantScope.conditions.lineage[*].value[*] in the real grant package; do not construct it yourself.
meta json Submit the complete package as an object, not as a file name/JSON string/response envelope. Do not modify fields or values; JSON whitespace and key order may vary.
Allows null: False
Example: {"version": "2026-05-27", "metaUUID": "meta_example", "createdAt": 1785427200, "expireAt": 1785429000, "sourceWorkspace": {"workspaceUUID": "wksp_source", "workspaceName": "Grantor Workspace"}, "targetWorkspaceUUID": "wksp_target", "sourceSite": {"siteCode": "source-region", "regionCode": "source-region", "name": "Guance Example Site", "issuer": "https://source-site.example", "baseUrl": "https://source-site.example", "jwksUri": "https://source-site.example/api/v1/workspace_data/.well-known/cross-site-jwks.json", "kid": "key-example", "publicKeys": [{"kid": "key-example", "publicKey": "<PEM public key generated by the server>"}]}, "grantScope": {"type": ["logging"], "indexes": ["default"], "conditions": {}}, "auth": {"tempAuthCode": "0123456789abcdef0123456789abcdef", "tempAuthCodeExpireAt": 1785429000}, "security": {"signAlg": "RS256", "kid": "key-example"}, "signature": "<JWS from the real grantor response; the example cannot be imported>"}
How to obtain or enter: Use the content.meta from the grantor's actual Generate meta response, or the complete file saved from it.

Additional Parameter Notes

The grantee imports the cross-site grant meta generated by the grantor. After import, the grantee actively accesses the grantor site to complete authentication and synchronization; the grantor does not actively access the grantee.

For details, see: Deployment Plan Cross-Site Grant Usage Instructions

  • Deployment Plan services must be upgraded to at least the 2026-06-03 release before they support the new cross-site grant method between sites.
  • After a successful import, a mirror grant record is generated locally; only after the record becomes active can it be used by the workspace selector, grant validation, and DQL queries.
  • Importing the same valid meta repeatedly returns the existing grant or a duplicate grant error; refer to the API response for the exact result.
  • Subsequent business modifications and revocations still use /wksp_share/<uuid>/modify and /wksp_share/delete.

Request Example

# grant-meta.json comes from the real grantor response content.meta, and successful status and target workspace have been verified
jq '{meta: .}' grant-meta.json > grant-import.json
curl --request POST 'https://openapi.guance.com/api/v1/workspace_data/cross_site_grant/meta/import' \
  -H 'DF-API-KEY: <grantee API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-binary @guance.com

Response

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

Field Type Description
content.grantUUID string UUID of the local mirror record on the target site; this is not equal to the source-side grantUUID.
content.status string On success, this is active, indicating that a usable mirror has been saved locally; this does not guarantee that all actual query environments have been validated.
content.recordRole string mirror, the role of the grantee's local record.
content.duplicated boolean false means newly created; for reuse of a specific existing record, it may be true; a normal duplicate import may also return an error directly, and idempotency is not guaranteed.
content.sourceWorkspaceUUID string Data provider workspace.
content.targetWorkspaceUUID string Current workspace of the target Key.
content.sourceWorkspaceName string Snapshot of the grantor name; may be empty.
content.targetWorkspaceName string Target workspace name; may be empty.
content.regionCode string The create branch returns the normalized source region code; the reuse branch may omit it.
content.toRegionCode string The create branch returns the target region code; the reuse branch may omit it.
content.siteRelationType string same_org_cross_site or external_org_cross_site; returned by the create branch and may be omitted by the reuse branch.
content.declaration object or null Workspace public declaration for non-empty business objects; may be null or an empty object when not configured; empty business objects are not attached.
{
  "code": 200,
  "content": {
    "grantUUID": "grant_mirror_example",
    "status": "active",
    "recordRole": "mirror",
    "duplicated": false,
    "sourceWorkspaceUUID": "wksp_source",
    "targetWorkspaceUUID": "wksp_target",
    "sourceWorkspaceName": "Grantor Workspace",
    "targetWorkspaceName": "Target Workspace",
    "regionCode": "source-region",
    "toRegionCode": "target-region",
    "siteRelationType": "same_org_cross_site",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

The example shows only the normal create branch; the controller-internal authResult replay path is not part of the public Body. Private key fields are recursively removed by the public entry point; auth.tempAuthCode is still sensitive one-exchange data and must be passed securely only to legitimate targets.

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 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 top level of the request JSON is not an object Partial JSON file format error Submit a JSON object according to the request example.
406 ft.CrossSiteGrantSiteIdentityMissing The current site identity configuration is incomplete The local site identity configuration for cross-site grants is incomplete. Check the global frontApiServerUrlPrefixFormat or the custom issuer/baseUrl/jwksUri and certificate keyId configuration in CrossSiteGrantCfg. The administrator should check the local site identity and address according to the deployment guide.
406 ft.CrossSiteGrantCertificateInvalid The current site's valid signing certificate is not initialized or is incomplete The cross-site grant certificate is not initialized or is incomplete. Run the cross-site grant certificate initialization script first. The administrator should initialize/repair the active certificate; do not upload private keys to this API.
406 ft.CrossSiteGrantTargetWorkspaceMismatch The package target UUID is not the current Key workspace The target workspace of the grant package does not match the current workspace. Switch to the correct workspace and import again. Switch to the correct target site/workspace Key; do not modify the signed package to force a match.
406 ft.CrossSiteGrantPackageInvalid Package fields/signature are invalid, metadata has been changed, or the format is incomplete The grant package is invalid or has been tampered with. Import the grant package generated by the grantor again. Obtain the complete meta generated by the grantor again.
406 ft.CrossSiteGrantPackageExpired The package or temporary code has expired The grant package has expired. Contact the grantor to regenerate the grant package. Handle the old pending record according to the grant record, then regenerate; do not manually extend the package time.
406 ft.CrossSiteGrantRelationDisabled The access relationship for this request or the corresponding capability at both ends is not enabled Cross-site grant is not enabled. Enable the configuration item: {} The administrator should enable the applicable configuration according to the actual relationship; the relationship cannot be forged by a request.
406 ft.CrossSiteGrantSameOrgSiteUnresolved Same-organization source site information is not initialized, is not in the official set, or the address does not match The same-organization cross-site grant site is not initialized or is not in the official AllSiteBaseUrls site set: {} The administrator should verify the site information; do not modify the package URL without authorization.
406 ft.CrossSiteGrantSameSiteNotAllowed Import according to a same-site relationship For same-site cross-workspace grants, use the in-site grant API; creation through the cross-site grant protocol is not allowed. Use the in-site grant API.
406 ft.WKSPRepeatAuthorization The current target already has the same valid source site/source workspace mirror The workspace has already been granted. Do not grant it again! Reuse the existing grant; if rebuilding is required, verify first and revoke according to the process.
406 ft.CrossSiteGrantAuthFailed Remote timeout/non-success, temporary code consumption failure, or signing identity or exchange data mismatch Cross-site grant authentication failed. Confirm whether the grant package is still valid and retry. Check the grant status and connectivity at both ends and retain the traceId; do not blindly replay a consumed package.
500 ft.InternalServerError Abnormal package nesting, signing request construction, database commit, or response processing failed Internal error Check package integrity and records at both ends, and troubleshoot using the traceId; a failure does not prove that the source side was not activated.

Feedback

Is this page helpful?