Generate Cross-Site Grant Meta¶
POST /api/v1/workspace_data/cross_site_grant/meta/create
Overview¶
Body Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| targetWorkspaceUUID | string | The UUID of the target workspace (the grantee). This field takes precedence. The old field workspaceUUID is also supported for compatibility.Allow null: False Allow empty string: False |
|
| workspaceUUID | string | The UUID of the target workspace (the grantee). This is a compatibility field. Callers are advised to use targetWorkspaceUUID instead.Allow null: False Allow empty string: False |
|
| type | array | Data types. ["*"] indicates all types.Example: ['logging', 'metric', 'object', 'custom_object', 'keyevent', 'tracing', 'rum', 'security', 'network', 'profiling'] Allow null: True |
|
| indexes | array | Index names. ["*"] indicates all indexes.Example: ['*'] Allow null: False |
|
| conditions | json | Filter conditions for the grant scope. Allow null: False |
Additional Parameter Notes¶
The grantor generates a cross-site grant meta file. The frontend or caller must first complete the CrossSiteGrantCfg public/private key initialization on the grantor's site.
For details, refer to: Deployment Plan Cross-Site Grant Usage Instructions
- Use Cases: After a user selects "Cross-Site Grant", call this API on the grantor workspace to generate the meta, then provide the complete meta to the grantee for import.
- The Deployment Plan service must be upgraded to at least the version released on 2026-06-03 to support the new version of cross-site grant.
- This API only creates a pending record for the grantor and returns the meta. It does not actively access the grantee's site.
- After generation, the business grant record can still be viewed via
/wksp_share/list, modified via/wksp_share/<uuid>/modify, and deleted or revoked via/wksp_share/delete.
Request Example¶
curl 'https://openapi.guance.com/api/v1/workspace_data/cross_site_grant/meta/create' \
-H 'Content-Type: application/json' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"targetWorkspaceUUID":"wksp_target","type":["logging"],"indexes":["*"],"conditions":{}}' \
--compressed
Response¶
{
"code": 200,
"content": {
"grantUUID": "grant_pending_1",
"status": "pending",
"expireAt": 1770000000,
"fileName": "cross-site-grant-wksp_target-1770000000.json",
"meta": {
"version": "2026-05-27",
"metaUUID": "meta_1",
"createdAt": 1769998200,
"expireAt": 1770000000,
"sourceWorkspace": {
"workspaceUUID": "wksp_source",
"workspaceName": "Grantor Workspace"
},
"targetWorkspaceUUID": "wksp_target",
"sourceSite": {
"siteCode": "testing",
"regionCode": "testing",
"issuer": "https://testing.example.com",
"baseUrl": "https://testing.example.com",
"jwksUri": "https://testing.example.com/api/v1/workspace_data/.well-known/cross-site-jwks.json",
"kid": "kid_1",
"publicKeys": [
{
"kid": "kid_1",
"publicKey": "-----BEGIN PUBLIC KEY-----..."
}
]
},
"grantScope": {
"type": [
"logging"
],
"indexes": [
"*"
],
"conditions": {}
},
"auth": {
"tempAuthCode": "temp_code_xxx",
"tempAuthCodeExpireAt": 1770000000
},
"security": {
"signAlg": "RS256",
"kid": "kid_1"
},
"signature": "<JWS>"
}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}