Repair data privilege operation¶
Reprocess a data-privilege change that needs repair or has an unconfirmed result. Repair creates a new change operation; continue tracking its new result.
POST https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/iam/roles/{role_id}/data-privilege-operations/{request_id}:repair
Preparation before calling¶
First select a role, then view the data privilege operation and confirm it can be repaired. Prepare a personal access token with required workspace permissions and the target workspace ID.
Request parameters¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/data-privilege-operations/$REQUEST_ID:repair" -H "X-API-Key: $AI_STUDIO_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID" -H "Content-Type: application/json" -d '{"request_id":"req-001","expected_data_privilege_version":1}'
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
|
string |
Yes |
Target role ID. |
|
string |
Yes |
Original data-privilege request ID to repair. |
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
New caller-generated idempotency request ID for this repair. |
|
integer |
Yes |
Expected data-privilege version; cannot be less than 0. |
Successful response¶
Returns the repair operation state. When its state is applying, view the new operation with this repair request’s request_id, not the original request ID in the path.
{"code":"OK","msg":"OK","data":{"request_id":"repair-req-001","trace_id":"trace-001","operation_id":"operation-002","audit_event_id":"audit-002","state":"succeeded","data_privilege_version":3,"idempotent_replay":false,"session_invalidation_status":"new_connections_only","matrixone_fact_version":"fact-v3","resource_results":[]}}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Repair request ID used to view the repair operation. |
|
string |
Server-generated repair operation ID. |
|
string |
Repair audit event ID. |
|
string |
Repair state: |
|
integer |
Data-privilege version after repair. |
|
boolean |
Whether this is an idempotent replay of the repair request. |
|
string |
Session privilege refresh status. |
|
string |
MatrixOne privilege fact version. |
|
object array |
Repair result for each resource. |
|
string |
Trace ID. |
Error response¶
{"code":"ErrParamInvalid","msg":"Invalid request parameters","data":null}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Error message. |
|
null |
— |