~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
main
84 lines · 2.5 KB Raw History
{
  "lexicon": 1,
  "id": "org.atgrp.internal.migrateReceive",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "On the destination host: take the group in. Pulls it from the host it's leaving with migratePrepare's token (its public repo, what the host it leaves keeps of each space as its authority and the group's repo there, its files), checked against the group's current key, and keeps it switched off. The caller must hold group.configure by the group's own records as they arrive. Answers with what the PLC operation should name.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "did",
            "serviceJwt",
            "snapshot",
            "exportToken"
          ],
          "properties": {
            "did": {
              "type": "string",
              "format": "did"
            },
            "serviceJwt": {
              "type": "string",
              "maxLength": 8192
            },
            "snapshot": {
              "type": "unknown"
            },
            "exportToken": {
              "type": "string",
              "maxLength": 8192
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "recommendedCreds"
          ],
          "properties": {
            "recommendedCreds": {
              "type": "unknown"
            },
            "records": {
              "type": "integer"
            },
            "blobs": {
              "type": "integer"
            },
            "spaces": {
              "type": "integer"
            }
          }
        }
      },
      "errors": [
        {
          "name": "NotAllowed",
          "description": "This host doesn't start groups for the caller."
        },
        {
          "name": "AlreadyHere",
          "description": "The group is on this host already."
        },
        {
          "name": "BadServiceJwt",
          "description": "serviceJwt isn't one the group signed, by its current key, for this host's migrateReceive."
        },
        {
          "name": "HandleNotAvailable",
          "description": "The group's address or handle is taken on this host."
        },
        {
          "name": "SourceUnreadable",
          "description": "The group's DID document, or the host it's leaving, couldn't be read, or answered with a failure or more than this host reads."
        }
      ]
    }
  }
}