{
  "protocol" : "relationship/v1",
  "operations" : {
    "capabilities" : {
      "description" : "Discover Relationship Protocol operations, scopes, and bounded rule vocabulary.",
      "required" : [ ],
      "fields" : { }
    },
    "record.archive" : {
      "description" : "Archive a record, retaining its history.",
      "required" : [ "workspace_id", "idempotency_key", "record_id", "expected_revision" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "record_id" : {
          "type" : "string"
        },
        "expected_revision" : {
          "type" : "integer"
        }
      }
    },
    "record.update" : {
      "description" : "Patch data and add/remove participant IDs explicitly; never replace a redacted response. State changes require commands.",
      "required" : [ "workspace_id", "idempotency_key", "record_id", "expected_revision", "patch" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "record_id" : {
          "type" : "string"
        },
        "expected_revision" : {
          "type" : "integer"
        },
        "patch" : {
          "type" : "object"
        },
        "roles" : {
          "type" : "object"
        }
      }
    },
    "record.search" : {
      "description" : "Search accessible record data or run a named program view. No implicit graph expansion.",
      "required" : [ "workspace_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "limit" : {
          "type" : "integer"
        },
        "collection_id" : {
          "type" : "string"
        },
        "cursor" : {
          "type" : "string"
        },
        "type" : {
          "type" : "string"
        },
        "state" : {
          "type" : "string"
        },
        "version" : {
          "type" : "integer"
        },
        "query" : {
          "type" : "string"
        },
        "namespace" : {
          "type" : "string"
        },
        "view" : {
          "type" : "string"
        }
      }
    },
    "program.draft" : {
      "description" : "Store an immutable program draft. Requires delegated programs:write and workspace administrator authority.",
      "required" : [ "workspace_id", "idempotency_key", "program" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "program" : {
          "type" : "object"
        }
      }
    },
    "workspace.list" : {
      "description" : "List your authorized workspaces.",
      "required" : [ ],
      "fields" : { }
    },
    "workspace.member" : {
      "description" : "Manage membership using an already verified Intergraph account ID (human console only).",
      "required" : [ "workspace_id", "idempotency_key", "account_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "account_id" : {
          "type" : "string"
        },
        "role" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "program.example" : {
      "description" : "Read the SalePiper or community example program; installation is a separate authorized operation.",
      "required" : [ "workspace_id", "name" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        }
      }
    },
    "record.history" : {
      "description" : "Read attributed immutable record history using current access and redaction rules.",
      "required" : [ "workspace_id", "record_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "cursor" : {
          "type" : "string"
        },
        "limit" : {
          "type" : "integer"
        },
        "record_id" : {
          "type" : "string"
        }
      }
    },
    "program.activate" : {
      "description" : "Activate a program version for new records. Existing records keep their pinned version. Requires separate programs:activate authority.",
      "required" : [ "workspace_id", "idempotency_key", "namespace", "version" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "namespace" : {
          "type" : "string"
        },
        "version" : {
          "type" : "integer"
        }
      }
    },
    "collection.create" : {
      "description" : "Create a collection with independent access control. New collections need separate AI consent.",
      "required" : [ "workspace_id", "idempotency_key", "name" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        }
      }
    },
    "record.get" : {
      "description" : "Read a record with inaccessible participants redacted. References never grant permission.",
      "required" : [ "workspace_id", "record_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "record_id" : {
          "type" : "string"
        }
      }
    },
    "collection.list" : {
      "description" : "List readable collections.",
      "required" : [ "workspace_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        }
      }
    },
    "command.list" : {
      "description" : "Inspect available commands, input schemas, transition conditions, and explanations.",
      "required" : [ "workspace_id", "record_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "record_id" : {
          "type" : "string"
        },
        "input" : {
          "type" : "object"
        }
      }
    },
    "command.execute" : {
      "description" : "Execute an authorized deterministic command against a revision. Changes, history and work-request events commit atomically. Work requests do not authorize external actions.",
      "required" : [ "workspace_id", "idempotency_key", "record_id", "expected_revision", "command" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "record_id" : {
          "type" : "string"
        },
        "expected_revision" : {
          "type" : "integer"
        },
        "command" : {
          "type" : "string"
        },
        "input" : {
          "type" : "object"
        }
      }
    },
    "collection.access" : {
      "description" : "Grant or remove a workspace member's collection access (workspace administrator).",
      "required" : [ "workspace_id", "idempotency_key", "collection_id", "account_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "collection_id" : {
          "type" : "string"
        },
        "account_id" : {
          "type" : "string"
        },
        "permission" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "record.create" : {
      "description" : "Create a typed entity or multiparty relationship using the active program. References require read access.",
      "required" : [ "workspace_id", "idempotency_key", "collection_id", "namespace", "type", "data" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "collection_id" : {
          "type" : "string"
        },
        "namespace" : {
          "type" : "string"
        },
        "type" : {
          "type" : "string"
        },
        "data" : {
          "type" : "object"
        },
        "participants" : {
          "type" : "object"
        }
      }
    },
    "program.list" : {
      "description" : "List immutable program versions and active version markers.",
      "required" : [ "workspace_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        }
      }
    },
    "workspace.create" : {
      "description" : "Create a team workspace (human console only).",
      "required" : [ "workspace_id", "idempotency_key", "name" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "idempotency_key" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        }
      }
    },
    "changes.list" : {
      "description" : "Read authorized durable events in order. Retain checkpoint and deduplicate event_id; current authorization also applies during replay.",
      "required" : [ "workspace_id" ],
      "fields" : {
        "workspace_id" : {
          "type" : "string"
        },
        "cursor" : {
          "type" : "string"
        },
        "limit" : {
          "type" : "integer"
        }
      }
    }
  }
}