at.functions.run

Invoke a registered AT Function

Details · procedure
Kindprocedure
Authorityfunctions.at
Indexed
cid bafyreic22nfxzs6dsdax3rcwrauvj4vkwdl6tkzmzzdnjny4trjcetqzti

Checks

Valid
  • unlimited-string defs.main.input.schema.properties.functionNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.output.schema.properties.errorNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.output.schema.properties.functionCidNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Invoke a registered AT Function",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "function": {
              "description": "at:// URI of the at.functions.metadata record",
              "type": "string"
            },
            "input": {
              "description": "JSON input passed to the function",
              "type": "unknown"
            }
          },
          "required": [
            "function",
            "input"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "durationMs": {
              "description": "Wall-clock execution time in milliseconds",
              "type": "integer"
            },
            "error": {
              "description": "Error message if execution failed",
              "type": "string"
            },
            "functionCid": {
              "description": "CID of the function record",
              "type": "string"
            },
            "ok": {
              "description": "Whether execution succeeded",
              "type": "boolean"
            },
            "output": {
              "description": "JSON output from the function",
              "type": "unknown"
            }
          },
          "required": [
            "ok"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.functions.run",
  "lexicon": 1
}