Protocol

App Record

Metadata and scope request for an application.

{
  "name": "Bird",
  "description": "Micro-blogging client",
  "icon": {...},
  "uris": {...},
  "scope_request": {...}
}

A private Record­ that an application creates to identify itself with a server.

Properties

  • name string

    • Name of the application.
  • description string optional

    • Short description of what the application does.
  • icon BlobLink optional

    • Icon of the application.

    • Maximum size of 20kB.

  • uris AppRecordUris

    • Map of endpoints the server should use to interact with the application.
  • scope_request AppRecordScopeRequest

    • Authorization scope sought by this application.

Notes

  • The App record is created by an application prior to the authorization flow.

  • An application can only update its own App record.

Properties

  • redirect URI

    • URI to redirect to after the authorization flow.

    • URL template variables:

      • {authorization_id}: ID of the authorization record on flow success.
  • notify URI

    • Webhook URL to call when new records are available.
  • website URI

    • User-facing public website of the application.

Properties

  • read RecordLink[] optional

    • Record types to be allowed to read.
  • write RecordLink[] optional

    • Record types to be allowed to write.
  • subscribe RecordLink[] optional

    • Record types to be allowed to subscribe to.
  • import RecordLink[] optional

    • Record types to be allowed to import.
  • notify RecordLink[] optional

    • Record types to be notified about (webhook).

This is what the full content of an App record might look like.

{
  "name": "Bird",
  "description": "Simple short-form social network.",
  "icon": {
    "hash": "9deb36508836ad7d278f6a91f997f5f32c7075b82b51e37c1ebaaa0ea9ea7942",
    "type": "image/png",
    "name": "icon"
  },
  "uris": {
    "redirect": "https://bird.baq.dev/auth{/authorization_id}",
    "website": "https://bird.baq.dev"
  },
  "scope_request": {
    "read": [
      {
        "entity": "types.baq.dev",
        "record_id": "6ee7f69a90154b849bac528daa942bcd"
      }
    ],
    "write": [
      {
        "entity": "types.baq.dev",
        "record_id": "6ee7f69a90154b849bac528daa942bcd"
      }
    ],
    "subscribe": [
      {
        "entity": "types.baq.dev",
        "record_id": "6ee7f69a90154b849bac528daa942bcd"
      }
    ]
  }
}
© 2024 Quentez