lol.dids.manage.validate

ngerakines.me

Documentation

Validate a site or tile record before writing it, and — for an authorized caller — prepare bard for it. Returns the AT-URI the record will have, the CID it will have, and the canonical record to submit with putRecord at that key.

main procedure

Validate a site or tile record before writing it, and — for an authorized caller — prepare bard for it. Returns the AT-URI the record will have, the CID it will have, and the canonical record to submit with putRecord at that key.

Input

Encodingapplication/json
dryRun boolean Optional

Validate only; never prepare.

record unknown Required

A lol.dids.sites.site or lol.dids.sites.tile record, with $type.

rkey string Optional

Required for a site (the hostname). For a tile: an existing rkey for a new version, a TID the client holds, or absent to have bard mint one.

space stringat-uri Optional

Validate as a record in this space; the caller must be its authority.

Output

Encodingapplication/json
cid stringcid Optional

A content identifier (CID) referencing immutable data.

entryCount integer Optional

No description available.

errors array Required

No description available.

expiresAt stringdatetime Optional

An RFC 3339 formatted timestamp.

missingBlobs array Required

No description available.

parameterErrors array Required

No description available.

prepared boolean Required

No description available.

reason string Optional

No description available.

Known values: DomainNotVerified, TileAuthorNotPermitted, PreparedQuotaExceeded, SpacePreparationUnsupported, DryRun
record unknown Optional

The record as bard will serialize it; submit it verbatim.

totalBytes integer Optional

No description available.

uri stringat-uri Optional

An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).

valid boolean Required

No description available.

Errors

InvalidRecordKey A site validation without rkey, or an rkey that is not a canonical hostname / valid TID.
TileNotReady The bound tile is known only as pending-publication and cannot be bound yet.
SpaceNotFound Bard is not connected to that space.
NotSpaceAuthority Only the space's authority may publish in it.
RateLimitExceeded Too many preparations this hour.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "type": "procedure",
  "input": {
    "schema": {
      "type": "object",
      "required": [
        "record"
      ],
      "properties": {
        "rkey": {
          "type": "string",
          "description": "Required for a site (the hostname). For a tile: an existing rkey for a new version, a TID the client holds, or absent to have bard mint one."
        },
        "space": {
          "type": "string",
          "format": "at-uri",
          "description": "Validate as a record in this space; the caller must be its authority."
        },
        "dryRun": {
          "type": "boolean",
          "description": "Validate only; never prepare."
        },
        "record": {
          "type": "unknown",
          "description": "A lol.dids.sites.site or lol.dids.sites.tile record, with $type."
        }
      }
    },
    "encoding": "application/json"
  },
  "errors": [
    {
      "name": "InvalidRecordKey",
      "description": "A site validation without rkey, or an rkey that is not a canonical hostname / valid TID."
    },
    {
      "name": "TileNotReady",
      "description": "The bound tile is known only as pending-publication and cannot be bound yet."
    },
    {
      "name": "SpaceNotFound",
      "description": "Bard is not connected to that space."
    },
    {
      "name": "NotSpaceAuthority",
      "description": "Only the space's authority may publish in it."
    },
    {
      "name": "RateLimitExceeded",
      "description": "Too many preparations this hour."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "valid",
        "errors",
        "parameterErrors",
        "prepared",
        "missingBlobs"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "state": {
          "ref": "lol.dids.defs#indexState",
          "type": "ref"
        },
        "valid": {
          "type": "boolean"
        },
        "errors": {
          "type": "array",
          "items": {
            "ref": "lol.dids.defs#validationError",
            "type": "ref"
          }
        },
        "reason": {
          "type": "string",
          "knownValues": [
            "DomainNotVerified",
            "TileAuthorNotPermitted",
            "PreparedQuotaExceeded",
            "SpacePreparationUnsupported",
            "DryRun"
          ]
        },
        "record": {
          "type": "unknown",
          "description": "The record as bard will serialize it; submit it verbatim."
        },
        "prepared": {
          "type": "boolean"
        },
        "expiresAt": {
          "type": "string",
          "format": "datetime"
        },
        "entryCount": {
          "type": "integer"
        },
        "totalBytes": {
          "type": "integer"
        },
        "missingBlobs": {
          "type": "array",
          "items": {
            "ref": "lol.dids.defs#missingBlob",
            "type": "ref"
          }
        },
        "parameterErrors": {
          "type": "array",
          "items": {
            "ref": "lol.dids.defs#validationError",
            "type": "ref"
          }
        }
      }
    },
    "encoding": "application/json"
  },
  "description": "Validate a site or tile record before writing it, and — for an authorized caller — prepare bard for it. Returns the AT-URI the record will have, the CID it will have, and the canonical record to submit with putRecord at that key."
}

Lexicon Garden

@