friendica/doc/API-Mastodon.md

20 KiB

Mastodon API

Overview

Friendica provides the following endpoints defined in the official Mastodon API reference.

Authentication is the same as described in Using the APIs.

Clients

Please find a list of supported apps at FAQ.

Entities

These endpoints use the Mastodon API entities. With some additional extensions listed below.

Instance (Version 2) Entities

Extensions to the Mastodon Instance::V2 Entities

  • friendica: Friendica specific properties of the V2 Instance including:
    • version: The Friendica version string
    • codename: The Friendica version code name
    • db_version: The database schema version number

Example:

{
  "domain": "friendicadevtest1.myportal.social",
  "title": "Friendica Social Network",
  "version": "2.8.0 (compatible; Friendica 2023.03-dev)",
  ...
  "friendica": {
    "version": "2023.03-dev",
    "codename": "Giant Rhubarb",
    "db_version": 1516
  }
}

Notification Entities

Extensions to the Mastodon Notification Entities

  • dismissed: whether the object has been dismissed or not

Status Entities

Extensions to the Mastodon Status Entities

  • in_reply_to_status: A fully populated Mastodon Status entity for the replied to status or null it is a post rather than a response
  • friendica: Friendica specific properties of a status including:
    • title: The Friendica title for a post, or empty if the status is a comment
    • delivery_data: Information about the state of federating a message from the server
      • delivery_queue_count: Total number of remote servers that the status needs to be federated to.
      • delivery_queue_done: Total number of remote servers that have successfully been federated to so far.
      • delivery_queue_failed: Total number of remote servers that have we failed to federate to so far.
    • dislikes_count: The number of dislikes that a status has accumulated according to the server.
    • disliked: Whether the API user disliked the status.

Example:

{
  "id": "358",
  "created_at": "2023-02-23T02:45:46.000Z",
  "in_reply_to_id": "356",
  "in_reply_to_status": {
    "id": "356",
    "created_at": "2023-02-23T02:45:35.000Z",
    "in_reply_to_id": null,
    "in_reply_to_status": null,
    "in_reply_to_account_id": null,
    ...
    "content": "A post from testuser1",
    ...
    "account": {
      "id": "6",
      "username": "testuser1",
      "acct": "testuser1",
      "display_name": "testuser1",
      ...
    },
    ...
    "friendica": {
      "title": "",
      "dislikes_count": 0
    }
  },
  "in_reply_to_account_id": "6",
  ...
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  ...
  "content": "A reply from testuser2",
  ...
  "account": {
    "id": "8",
    "username": "testuser2",
    "acct": "testuser2",
    "display_name": "testuser2",
    ...
  },
  ...
  "friendica": {
    "title": "",
    "delivery_data": {
      "delivery_queue_count": 10,
      "delivery_queue_done": 3,
      "delivery_queue_failed": 0
    },
    "dislikes_count": 0
  }
}

Implemented endpoints

Currently unimplemented endpoints

These endpoints are planned to be implemented somewhere in the future.

Dummy endpoints

These endpoints are returning empty data to avoid error messages when using third party clients. They refer to features that don't exist in Friendica yet.

Non supportable endpoints

These endpoints won't be implemented at the moment. They refer to features or data that don't exist in Friendica yet.