{
  "schemaVersion": 1,
  "operation": {
    "operationId": "revokeResourceShareGrant",
    "method": "DELETE",
    "path": "/api/v1/resource-share-grants/{grant}",
    "summary": "Revoke a durable resource-share grant",
    "description": "",
    "tags": [
      "Access"
    ],
    "effect": "destructive",
    "confirmation": "required",
    "parameters": [
      {
        "name": "grant",
        "in": "path",
        "required": true,
        "description": "",
        "schema": {
          "type": "string"
        }
      }
    ],
    "requestBody": {
      "required": true,
      "description": "",
      "content": [
        {
          "contentType": "application/json",
          "schema": {
            "$ref": "#/components/schemas/ResourceShareGrantRevokeRequest"
          }
        }
      ]
    },
    "responses": [
      {
        "status": "200",
        "description": "The request has succeeded.",
        "content": [
          {
            "contentType": "application/json",
            "schema": {
              "$ref": "#/components/schemas/ResourceShareGrantResponse"
            }
          }
        ]
      },
      {
        "status": "400",
        "description": "The server could not understand the request due to invalid syntax.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "401",
        "description": "Access is unauthorized.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "403",
        "description": "Access is forbidden.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "404",
        "description": "The server cannot find the requested resource.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "409",
        "description": "The request conflicts with the current state of the server.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "412",
        "description": "Precondition failed.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "413",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "415",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "422",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "429",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "500",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "502",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "503",
        "description": "Service unavailable.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      }
    ]
  },
  "schemas": {
    "PermissionAction": {
      "enum": [
        "dashboard.read",
        "dashboard.create",
        "dashboard.update",
        "dashboard.delete",
        "dashboard.publish",
        "semantic.read",
        "semantic.query",
        "semantic.consume",
        "semantic.create",
        "semantic.update",
        "semantic.delete",
        "source.read",
        "source.create",
        "source.update",
        "source.delete",
        "model.read",
        "model.create",
        "model.update",
        "model.delete",
        "pipeline.read",
        "pipeline.create",
        "pipeline.run",
        "pipeline.update",
        "pipeline.delete",
        "connection.read",
        "connection.create",
        "connection.use",
        "connection.manage",
        "connection.upload",
        "resource.share",
        "delivery.read",
        "delivery.plan",
        "delivery.build",
        "delivery.publish",
        "delivery.approve",
        "delivery.activate",
        "delivery.rollback",
        "project.settings.read",
        "project.settings.update",
        "project.access.read",
        "project.access.manage",
        "project.access.delegate",
        "audit.read",
        "workload.delegate",
        "platform.settings.read",
        "platform.settings.update",
        "platform.access.read",
        "platform.access.manage",
        "platform.audit.read",
        "instance.project.claim"
      ],
      "example": "dashboard.read",
      "type": "string"
    },
    "PermissionCatalogProfile": {
      "enum": [
        "leapview.permissions/v1"
      ],
      "example": "leapview.permissions/v1",
      "type": "string"
    },
    "PermissionPair": {
      "example": {
        "action": "dashboard.read",
        "profile": "leapview.permissions/v1",
        "target": {
          "projectId": "project:analytics",
          "resourceId": "dashboard:sales",
          "resourceKind": "dashboard",
          "scope": "resource"
        }
      },
      "properties": {
        "action": {
          "$ref": "#/components/schemas/PermissionAction"
        },
        "profile": {
          "$ref": "#/components/schemas/PermissionCatalogProfile"
        },
        "target": {
          "$ref": "#/components/schemas/PermissionTarget"
        }
      },
      "required": [
        "action",
        "target",
        "profile"
      ],
      "type": "object"
    },
    "PermissionScope": {
      "enum": [
        "instance",
        "project",
        "resource"
      ],
      "example": "instance",
      "type": "string"
    },
    "PermissionTarget": {
      "example": {
        "projectId": "project:analytics",
        "resourceId": "dashboard:sales",
        "resourceKind": "dashboard",
        "scope": "resource"
      },
      "properties": {
        "includeFuture": {
          "example": true,
          "type": "boolean"
        },
        "instanceId": {
          "example": "example",
          "type": "string"
        },
        "projectId": {
          "example": "example",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
          "type": "string"
        },
        "resourceId": {
          "example": "example",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
          "type": "string"
        },
        "resourceKind": {
          "$ref": "#/components/schemas/ResourceKind"
        },
        "scope": {
          "$ref": "#/components/schemas/PermissionScope"
        }
      },
      "required": [
        "scope"
      ],
      "type": "object"
    },
    "ProblemDetails": {
      "example": {
        "code": "example",
        "detail": "example",
        "errors": [
          {
            "code": "example",
            "detail": "example",
            "field": "example"
          }
        ],
        "instance": "example",
        "requestId": "example",
        "status": 1,
        "title": "example",
        "type": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "errors": {
          "example": [
            {
              "code": "example",
              "detail": "example",
              "field": "example"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ProblemFieldError"
          },
          "type": "array"
        },
        "instance": {
          "example": "example",
          "type": "string"
        },
        "requestId": {
          "example": "example",
          "type": "string"
        },
        "status": {
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "title": {
          "example": "example",
          "type": "string"
        },
        "type": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "type",
        "title",
        "status",
        "detail",
        "instance",
        "code",
        "requestId",
        "errors"
      ],
      "type": "object"
    },
    "ProblemFieldError": {
      "example": {
        "code": "example",
        "detail": "example",
        "field": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "field": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "field",
        "code",
        "detail"
      ],
      "type": "object"
    },
    "ResourceKind": {
      "enum": [
        "project",
        "connection",
        "source",
        "model",
        "semantic_model",
        "pipeline",
        "dashboard"
      ],
      "example": "project",
      "type": "string"
    },
    "ResourceShareGrantResponse": {
      "example": {
        "expiresAt": "2026-01-02T15:04:05Z",
        "fingerprint": "example",
        "id": "example",
        "idempotencyKey": "example",
        "instanceId": "example",
        "issuedAt": "2026-01-02T15:04:05Z",
        "permissions": [
          {
            "action": "dashboard.read",
            "profile": "leapview.permissions/v1",
            "target": {
              "projectId": "project:analytics",
              "resourceId": "dashboard:sales",
              "resourceKind": "dashboard",
              "scope": "resource"
            }
          }
        ],
        "profile": "example",
        "projectId": "example",
        "recipientId": "example",
        "recipientType": "example",
        "requestDigest": "example",
        "resourceId": "example",
        "resourceKind": "project",
        "resourceUid": "example",
        "revocationReason": "example",
        "revokedAt": "2026-01-02T15:04:05Z",
        "revokedByPrincipalId": "example"
      },
      "properties": {
        "expiresAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "fingerprint": {
          "example": "example",
          "type": "string"
        },
        "id": {
          "example": "example",
          "type": "string"
        },
        "idempotencyKey": {
          "example": "example",
          "type": "string"
        },
        "instanceId": {
          "example": "example",
          "type": "string"
        },
        "issuedAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "permissions": {
          "example": [
            {
              "action": "dashboard.read",
              "profile": "leapview.permissions/v1",
              "target": {
                "projectId": "project:analytics",
                "resourceId": "dashboard:sales",
                "resourceKind": "dashboard",
                "scope": "resource"
              }
            }
          ],
          "items": {
            "$ref": "#/components/schemas/PermissionPair"
          },
          "type": "array"
        },
        "profile": {
          "example": "example",
          "type": "string"
        },
        "projectId": {
          "example": "example",
          "maxLength": 200,
          "minLength": 1,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
          "type": "string"
        },
        "recipientId": {
          "example": "example",
          "type": "string"
        },
        "recipientType": {
          "example": "example",
          "type": "string"
        },
        "requestDigest": {
          "example": "example",
          "type": "string"
        },
        "resourceId": {
          "example": "example",
          "maxLength": 200,
          "minLength": 1,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
          "type": "string"
        },
        "resourceKind": {
          "$ref": "#/components/schemas/ResourceKind"
        },
        "resourceUid": {
          "example": "example",
          "type": "string"
        },
        "revocationReason": {
          "example": "example",
          "type": "string"
        },
        "revokedAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "revokedByPrincipalId": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "id",
        "profile",
        "instanceId",
        "projectId",
        "resourceUid",
        "resourceKind",
        "resourceId",
        "recipientType",
        "recipientId",
        "permissions",
        "issuedAt",
        "fingerprint",
        "idempotencyKey",
        "requestDigest"
      ],
      "type": "object"
    },
    "ResourceShareGrantRevokeRequest": {
      "example": {
        "reason": "example"
      },
      "properties": {
        "reason": {
          "example": "example",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}
