Modify¶
POST /api/v1/wksp_share/{wksp_share_uuid}/modify
Overview¶
Replaces, in full, the data domains, indexes, and conditions of an authorization configuration issued by the current workspace.
Before You Call / Usage Steps¶
Use the API Key of the workspace that acts as the data grantor for create/modify/delete; for reads, operate according to the grant direction of the current Key's workspace. This group grants data query capability between workspaces; it does not invite members, assign account roles, or copy data. In the response, workspaceUUID is the grantor and toWorkspaceUUID is the grantee; only the newly supplied Body.workspaceUUID indicates the target workspace being granted, which is the opposite direction from the field of the same name in the response. Whether a query takes effect is also limited by the data domains, log indexes, filter conditions, actual authorization status, and source workspace status.
Create/modify/delete requires dataRightsManage.workspaceConfigManage. First use Grant List with type=grant to read records issued by the current workspace itself, and take content.data[].uuid; do not treat the UUID of another source workspace in the granted-to list as a configuration you can modify. When the result is unknown, read the configuration back first to avoid duplicate authorization or mistakenly assuming a failure executed nothing.
You can only modify records where the current workspace is the grantor and the model status=0; grantStatus=active is not additionally required, so pending/expired records may also match. Unknown configurations or configurations of other workspaces return 404. The target workspace and site cannot be modified through this public Body; workspaceUUID/regionCode/roleUUIDs are not declared in this page's Body. type/indexes must be submitted in full; omitting conditions defaults to {} and clears the old conditions; there is no PATCH merge semantics.
Local scope updates to existing same-site/cross-site authorization records are supported. After a cross-site update is submitted, only the local authentication caches of relevant sites are invalidated; the old remote sync chain is not actively called, and immediate convergence on the grantee side is not guaranteed; please verify against actual query/authorization status. After saving, the original model fields are returned, without the derived fields that the list supplies such as grantMode/grantStatus/site name/identity summary; some authentication-related extensions may not be sanitized as they are in read APIs, so do not share the full write response externally.
conditions omitted or {} means no additional conditions; when modifying, omitting it clears the old conditions rather than preserving them. Only the three arrays metric/tracing/rum are public; lineage sub-conditions are not exposed (although the shared internal validator recognizes this name), and extra Body fields are rejected. Array elements are recommended to be objects: op must be in/not in, and value must be an array; logic must be consistent within the same category, and and/or is recommended. Currently the logic enum, name requiredness, and array element object shape are not strictly validated; malformed elements may cause 500, and a successful save cannot be relied upon to prove that the conditions are necessarily valid. Conditions in different data domains do not grant each other, nor do they mean that data domains without configured conditions are prohibited.
Route Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| wksp_share_uuid | string | Y | The actual URL path parameter, usually with the grant_ prefix, not a workspace UUID. Example: grant_exampleHow to obtain or fill: Get the configuration ID from content.data[].uuid in Grant List. |
Request Headers¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential of the workspace. Example: <DF-API-KEY>How to obtain or fill: Obtain an OpenAPI Key with this operation permission from the API Key management of the target workspace. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| conditions.metric[*] | json | One condition object; the following subfields are semantic guidance and are currently not fully validated item by item upfront. Example: {"name": "host", "op": "in", "logic": "and", "value": ["example-value"]}How to obtain or fill: Fill in one set of conditions for each item in the array. |
|
| conditions.metric[*].name | string | The actual field name, not a field configuration UUID. Example: hostHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
|
| conditions.metric[*].op | string | Conditionally required | Must be in or not in; omitted/other values return 406. Example: inHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
| conditions.metric[*].logic | string | and/or is recommended; it must be consistent within the same domain, the enum is currently not strictly validated, and omission also participates in the consistency comparison. Example: andHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
|
| conditions.metric[*].value | array | Conditionally required | Must be an array; fill elements according to the actual field type; an empty array cannot be understood as all. Example: ["example-value"]How to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
| conditions.tracing[*] | json | One condition object; the following subfields are semantic guidance and are currently not fully validated item by item upfront. Example: {"name": "service", "op": "in", "logic": "and", "value": ["example-value"]}How to obtain or fill: Fill in one set of conditions for each item in the array. |
|
| conditions.tracing[*].name | string | The actual field name, not a field configuration UUID. Example: serviceHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
|
| conditions.tracing[*].op | string | Conditionally required | Must be in or not in; omitted/other values return 406. Example: inHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
| conditions.tracing[*].logic | string | and/or is recommended; it must be consistent within the same domain, the enum is currently not strictly validated, and omission also participates in the consistency comparison. Example: andHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
|
| conditions.tracing[*].value | array | Conditionally required | Must be an array; fill elements according to the actual field type; an empty array cannot be understood as all. Example: ["example-value"]How to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
| conditions.rum[*] | json | One condition object; the following subfields are semantic guidance and are currently not fully validated item by item upfront. Example: {"name": "app_id", "op": "in", "logic": "and", "value": ["example-value"]}How to obtain or fill: Fill in one set of conditions for each item in the array. |
|
| conditions.rum[*].name | string | The actual field name, not a field configuration UUID. Example: app_idHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
|
| conditions.rum[*].op | string | Conditionally required | Must be in or not in; omitted/other values return 406. Example: inHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
| conditions.rum[*].logic | string | and/or is recommended; it must be consistent within the same domain, the enum is currently not strictly validated, and omission also participates in the consistency comparison. Example: andHow to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
|
| conditions.rum[*].value | array | Conditionally required | Must be an array; fill elements according to the actual field type; an empty array cannot be understood as all. Example: ["example-value"]How to obtain or fill: Construct according to the fields of the domain and the allowed business values. |
| type | array | Y | Required array; * means all; [] does not mean all. The public declaration allows null, but subsequent business logic may return 500, so be sure to submit an array. The enum is not validated item by item; arbitrary unknown values are not recommended. Allows null: True Example: ["metric", "logging"]How to obtain or fill: Choose according to the domains to be actually authorized, such as metric/logging/tracing/rum/object/custom_object/lineage, which must be supported by the target query capability. |
| indexes | array | Y | Required array. It is saved when type contains * or logging; otherwise it is forcibly cleared to []; * means all indexes, and [] does not mean all. Whether each index actually exists is not checked on save.Allows null: False Example: ["default"]How to obtain or fill: Take name from the grantor's Log Index List, not the configuration UUID; with explicit pagination the path is content.data[].name, and without pagination it is the native content[].name. |
| conditions | json | conditions omitted or {} means no additional conditions; when modifying, omitting it clears the old conditions rather than preserving them. Only the three arrays metric/tracing/rum are public; lineage sub-conditions are not exposed (although the shared internal validator recognizes this name), and extra Body fields are rejected. Array elements are recommended to be objects: op must be in/not in, and value must be an array; logic must be consistent within the same category, and and/or is recommended. Currently the logic enum, name requiredness, and array element object shape are not strictly validated; malformed elements may cause 500, and a successful save cannot be relied upon to prove that the conditions are necessarily valid. Conditions in different data domains do not grant each other, nor do they mean that data domains without configured conditions are prohibited. Allows null: False Example: {"metric": [{"name": "host", "op": "in", "logic": "and", "value": ["host-example"]}]}How to obtain or fill: Construct the minimum allowed scope based on the grantor's actual fields and values. |
|
| conditions.metric | array | Optional condition array; omitting it or [] adds no filter for this category; when modifying, the entire conditions is replaced with the submitted value. Allows null: False Example: [{"name": "host", "op": "in", "logic": "and", "value": ["example-value"]}]How to obtain or fill: Select filter conditions from the actual metric fields and values. |
|
| conditions.tracing | array | Optional condition array; omitting it or [] adds no filter for this category; when modifying, the entire conditions is replaced with the submitted value. Allows null: False Example: [{"name": "service", "op": "in", "logic": "and", "value": ["example-value"]}]How to obtain or fill: Select filter conditions from the actual tracing fields and values. |
|
| conditions.rum | array | Optional condition array; omitting it or [] adds no filter for this category; when modifying, the entire conditions is replaced with the submitted value. Allows null: False Example: [{"name": "app_id", "op": "in", "logic": "and", "value": ["example-value"]}]How to obtain or fill: Select filter conditions from the actual rum fields and values. |
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/wksp_share/grant_example/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"type":["metric","logging"],"indexes":["default"],"conditions":{"metric":[{"name":"host","op":"in","logic":"and","value":["host-example"]}]}}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.id | integer | Internal row number, not used as an API resource identifier. |
| content.uuid | string | Authorization configuration UUID, usually with the grant_ prefix; use this value for details/modify/delete. |
| content.workspaceUUID | string | UUID of the grantor workspace to which the API Key of this call belongs; see toWorkspaceUUID for the target workspace. |
| content.workspaceName | string | Grantor workspace name. |
| content.toWorkspaceUUID | string | The target workspace that receives the data query authorization. |
| content.toWorkspaceName | string | Grantee workspace name. |
| content.regionCode | string | Grantor site identifier. |
| content.toRegionCode | string | Target site identifier; on read, legacy empty values are filled in per compatibility rules. |
| content.siteRelationType | string | Site relation such as same_site/same_org_cross_site/external_org_cross_site; historical records may be empty. |
| content.sourceBaseUrl | string | Source address of some cross-site records; usually empty for same-site records; not the API Endpoint of this call. |
| content.targetBaseUrl | string | Target address of some cross-site records; usually empty for same-site records. |
| content.type | array/string or null | Saved authorized data domains; * means all. Historical data may not be normalized, and status 0 alone does not prove validity. |
| content.type[] | JSON | Usually a data domain string; the current legacy entry does not fully check element enums. |
| content.indexes | array or null | Set of authorized log index names, not index UUIDs; * means all, and it is saved as [] when the log domain is not granted. |
| content.indexes[] | string | One index name, such as default. |
| content.conditions | object or null | Filter configuration saved by metric/tracing/rum; not the data permission itself or query results. |
| content.extra | object or null | Records roles, grant status, and cross-site extensions. Read and write responses have different sanitization rules; do not share raw write responses containing authentication diagnostics externally. |
| content.extra.recordRole | string | Such as authority/mirror; only present on some records. |
| content.extra.grantStatus | string | The status saved with the record; on read, pending may be displayed as expired based on time. |
| content.delayDeleteAt | integer | Scheduled deletion time; -1 usually means not scheduled; does not mean the record is necessarily valid. |
| content.status | integer | Model status; 0 is not deleted, deleted is usually 3; business authorization also depends on grantStatus, etc. |
| content.creator | string | Creator identifier, which may be an API Key UUID or a historical account/system identity. |
| content.updator | string | Most recent operator; may be empty. |
| content.createAt | integer | Creation Unix seconds. |
| content.updateAt | integer | Update Unix seconds; may initially be -1. |
| content.deleteAt | integer | Soft deletion Unix seconds; usually -1 when not deleted. |
| content.conditions.metric | array | Condition array of the metric category. |
| content.conditions.metric[] | object | One set of conditions; elements currently have no full upfront structure validation. |
| content.conditions.metric[].name | string | Actual field name. |
| content.conditions.metric[].op | string | in or not in. |
| content.conditions.metric[].logic | string | and/or is recommended and must be consistent within the same category; the enum is currently not strictly validated. |
| content.conditions.metric[].value | array | Condition value array; elements follow the actual field type. |
| content.conditions.tracing | array | Condition array of the tracing category. |
| content.conditions.tracing[] | object | One set of conditions; elements currently have no full upfront structure validation. |
| content.conditions.tracing[].name | string | Actual field name. |
| content.conditions.tracing[].op | string | in or not in. |
| content.conditions.tracing[].logic | string | and/or is recommended and must be consistent within the same category; the enum is currently not strictly validated. |
| content.conditions.tracing[].value | array | Condition value array; elements follow the actual field type. |
| content.conditions.rum | array | Condition array of the rum category. |
| content.conditions.rum[] | object | One set of conditions; elements currently have no full upfront structure validation. |
| content.conditions.rum[].name | string | Actual field name. |
| content.conditions.rum[].op | string | in or not in. |
| content.conditions.rum[].logic | string | and/or is recommended and must be consistent within the same category; the enum is currently not strictly validated. |
| content.conditions.rum[].value | array | Condition value array; elements follow the actual field type. |
| content.authorizationCode | string or null | Legacy model authentication compatibility field that may be present; not a normal business call credential. |
| content.declaration | object or null | Workspace public declaration of a non-empty business object; may be null or an empty object when not configured; empty business objects are not attached. |
| content.extra.tempAuthCodeExpireAt | integer | Expiration Unix seconds of the temporary authorization package; may be omitted; not an authentication code that can be used directly. |
| content.extra.pendingTargetWorkspaceUUID | string | Expected target workspace of a pending record; may be omitted. |
| content.extra.metaUUID | string | Authorization package identifier; may be omitted; not the grant configuration UUID. |
| content.extra.grantScopeFingerprint | string | Authorization scope digest; may be omitted; not used as a customer authentication parameter. |
| content.extra.createdAt | integer | Extended record creation Unix seconds; may be omitted. |
| content.extra.authorityGrantUUID | string | Source authorization configuration UUID associated with a mirror record; may be omitted; cannot be directly treated as a configuration owned by the current Key's workspace. |
| content.extra.sourceKid | string | Source site public key identifier; may be omitted. |
| content.extra.sourceJwksUri | string | Source site public key set URL; may be omitted. |
| content.extra.syncStatus | string | Cross-site sync status, such as success/failed or empty; may be omitted. |
| content.extra.lastSyncAt | integer | Last sync Unix seconds; may be omitted. |
| content.extra.lastSyncError | string | Adapted summary of the most recent sync error; may be omitted; not the outer API error code of this call. |
| content.extra.lastSyncErrorAt | integer | Most recent sync failure Unix seconds; may be omitted. |
| content.extra.resourceSummary | object | Resource summary saved during sync for some cross-site records; may be omitted; not a real-time complete resource list. |
| content.extra.resourceSummary.logging | object | Log resource summary; may be omitted. |
| content.extra.resourceSummary.logging.indexes | array | Log index summary items synced from upstream; elements may be strings or objects and are saved as-is. |
| content.extra.resourceSummary.logging.indexes[] | JSON | One index summary; a fixed uuid/name shape cannot be assumed; still take actual parameters from the index list before operating on indexes. |
| content.extra.resourceSummary.rum | object | RUM resource summary; may be omitted. |
| content.extra.resourceSummary.rum.applications | array | Upstream RUM application summary items, returned as strings or objects as applicable. |
| content.extra.resourceSummary.rum.applications[] | JSON | Application summary; not a substitute for the current site's application configuration UUID. |
| content.extra.resourceSummary.updatedAt | number | Numeric value of when the resource summary was generated; the unit is determined by upstream, and Studio does not convert units or guarantee uniformity. |
| content.extra.resourceSummary.sourceGrantUUID | string | Source authorization configuration identifier associated with the resource summary. |
| content.extra.sourceSite | object | Snapshot of the grantor/grantee site identity; may be omitted; does not replace the current request Endpoint. |
| content.extra.sourceSite.siteCode | string | Site code. May be omitted. |
| content.extra.sourceSite.regionCode | string | Region code. May be omitted. |
| content.extra.sourceSite.name | string | Site display name. May be omitted. |
| content.extra.sourceSite.issuer | string | Signing identity. May be omitted. |
| content.extra.sourceSite.baseUrl | string | Site API base URL. May be omitted. |
| content.extra.sourceSite.jwksUri | string | Public key set URL. May be omitted. |
| content.extra.sourceSite.kid | string | Public key identifier. May be omitted. |
| content.extra.sourceSite.publicKeys | array | Some site snapshots contain public key material; may be omitted; no private keys. |
| content.extra.sourceSite.publicKeys[] | object | Optional public key item. |
| content.extra.sourceSite.publicKeys[].kid | string | Public key identifier. |
| content.extra.sourceSite.publicKeys[].publicKey | string | PEM public key body. |
| content.extra.targetSite | object | Snapshot of the grantor/grantee site identity; may be omitted; does not replace the current request Endpoint. |
| content.extra.targetSite.siteCode | string | Site code. May be omitted. |
| content.extra.targetSite.regionCode | string | Region code. May be omitted. |
| content.extra.targetSite.name | string | Site display name. May be omitted. |
| content.extra.targetSite.issuer | string | Signing identity. May be omitted. |
| content.extra.targetSite.baseUrl | string | Site API base URL. May be omitted. |
| content.extra.targetSite.jwksUri | string | Public key set URL. May be omitted. |
| content.extra.targetSite.kid | string | Public key identifier. May be omitted. |
| content.extra.targetSite.publicKeys | array | Some site snapshots contain public key material; may be omitted; no private keys. |
| content.extra.targetSite.publicKeys[] | object | Optional public key item. |
| content.extra.targetSite.publicKeys[].kid | string | Public key identifier. |
| content.extra.targetSite.publicKeys[].publicKey | string | PEM public key body. |
| content.extra.resourceSummary.metric | object | Resource summary of the corresponding domain; may be omitted. |
| content.extra.resourceSummary.metric.workspaceUUIDs | array | Set of source workspace identifiers saved during sync; elements are usually strings; not an authorization for the current Key to operate any workspace. |
| content.extra.resourceSummary.metric.workspaceUUIDs[] | JSON | Individual workspace identifiers as actually returned by upstream; verify non-normalized historical items first. |
| content.extra.resourceSummary.tracing | object | Resource summary of the corresponding domain; may be omitted. |
| content.extra.resourceSummary.tracing.workspaceUUIDs | array | Set of source workspace identifiers saved during sync; elements are usually strings; not an authorization for the current Key to operate any workspace. |
| content.extra.resourceSummary.tracing.workspaceUUIDs[] | JSON | Individual workspace identifiers as actually returned by upstream; verify non-normalized historical items first. |
| content.extra.resourceSummary.lineage | object | Resource summary of the corresponding domain; may be omitted. |
| content.extra.resourceSummary.lineage.workspaceUUIDs | array | Set of source workspace identifiers saved during sync; elements are usually strings; not an authorization for the current Key to operate any workspace. |
| content.extra.resourceSummary.lineage.workspaceUUIDs[] | JSON | Individual workspace identifiers as actually returned by upstream; verify non-normalized historical items first. |
{
"code": 200,
"content": {
"id": 10,
"uuid": "grant_example",
"workspaceUUID": "wksp_source",
"toWorkspaceUUID": "wksp_target",
"regionCode": "SITE-CODE",
"toRegionCode": "SITE-CODE",
"workspaceName": "Grantor Example Workspace",
"toWorkspaceName": "Grantee Example Workspace",
"authorizationCode": null,
"siteRelationType": "same_site",
"sourceBaseUrl": "",
"targetBaseUrl": "",
"extra": {
"recordRole": "authority",
"grantStatus": "active"
},
"type": [
"metric",
"logging"
],
"indexes": [
"default"
],
"conditions": {
"metric": [
{
"name": "host",
"op": "in",
"logic": "and",
"value": [
"host-example"
]
}
]
},
"delayDeleteAt": -1,
"status": 0,
"creator": "wsak_example",
"updator": "wsak_example",
"createAt": 1785427200,
"updateAt": 1785429000,
"deleteAt": -1,
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
The historical path field of the runtime declaration was misnamed; this page only corrects the documentation display; the actual URL parameter is wksp_share_uuid. Business ownership and replacement behavior follow the current implementation.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 404 | ft.ObjectNotExists | No authorization record found where the current workspace is the source and the model status=0 | The specified object does not exist | Re-obtain the value from content.data[].uuid in the type=grant list; do not substitute a workspace UUID. |
| 406 | ft.ParameterValidationFailed | Request field missing, or 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 based on content.reason, line, column. |
| 400 | ft.JsonFormatError | The body is not an object | Some json file format error | Submit the JSON object of this page. |
| 406 | ft.WorkspaceGrantConditionOperatorInvalid | Condition element op is missing or is not in/not in | Authorization scope {} condition operator supports only in or not in | Fill in in or not in for each item, and keep the field consistent with the business scope. |
| 406 | ft.WorkspaceGrantConditionValueMustBeList | Condition element value is not an array | The value field of authorization scope {} conditions must be a list | Use a JSON array; do not submit a comma-separated string. |
| 406 | ft.WorkspaceGrantConditionLogicMixed | Multiple different logic values appear in the same category (including mixing omitted with and) | Authorization scope {} conditions do not support mixing different logical operators | Unify logic to and or or for all conditions in the same category. |
| 406 | ft.WKSPShareInvalid | Historical record target UUID is invalid, or the same-site target workspace no longer exists/is inactive; this call does not reject existing cross-site records or reject modification solely because the target versionType=freeEdition | Invalid workspace uuid | Check the current source record and the actual target workspace status; use the scope fields supported by the public Body and do not attempt to replace the target workspace/site. |
| 406 | ft.WKSPIllegalAuthorization | Attempting to authorize the current grantor workspace to itself | Data authorization requires a non-current workspace ID, please re-enter | Fill in a different grantee target workspace UUID. |
| 406 | ft.WKSPRepeatAuthorization | A status=0 record already exists for the same source/target/site (grantStatus is not additionally checked) | Workspace already authorized, do not duplicate authorization! | Read the existing configuration first and modify it as needed instead of creating a duplicate. |
| 500 | ft.InternalServerError | type=null processed by subsequent code, abnormal condition element structure, storage error, or failure to prepare cache/site data after submission | Internal error | Read back the list/details first to verify whether it was saved, keep the traceId, and then decide whether to retry; do not assume the whole operation has been rolled back. |