summaryrefslogtreecommitdiff
path: root/docs/development
diff options
context:
space:
mode:
Diffstat (limited to 'docs/development')
-rw-r--r--docs/development/API/admin_api.md56
-rw-r--r--docs/development/API/differences_in_mastoapi_responses.md12
-rw-r--r--docs/development/API/nodeinfo.md347
-rw-r--r--docs/development/API/pleroma_api.md33
4 files changed, 422 insertions, 26 deletions
diff --git a/docs/development/API/admin_api.md b/docs/development/API/admin_api.md
index 8f855d251..f14081893 100644
--- a/docs/development/API/admin_api.md
+++ b/docs/development/API/admin_api.md
@@ -261,6 +261,46 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
}
```
+## `PATCH /api/v1/pleroma/admin/users/suggest`
+
+### Suggest a user
+
+Adds the user(s) to follower recommendations.
+
+- Params:
+ - `nicknames`: nicknames array
+- Response:
+
+```json
+{
+ users: [
+ {
+ // user object
+ }
+ ]
+}
+```
+
+## `PATCH /api/v1/pleroma/admin/users/unsuggest`
+
+### Unsuggest a user
+
+Removes the user(s) from follower recommendations.
+
+- Params:
+ - `nicknames`: nicknames array
+- Response:
+
+```json
+{
+ users: [
+ {
+ // user object
+ }
+ ]
+}
+```
+
## `GET /api/v1/pleroma/admin/users/:nickname_or_id`
### Retrive the details of a user
@@ -319,6 +359,22 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
}
```
+## `DELETE /api/v1/pleroma/admin/instances/:instance`
+
+### Delete all users and activities from a remote instance
+
+Note: this will trigger a job to remove instance content in the background.
+It may take some time.
+
+- Params:
+ - `instance`: remote instance host
+- Response:
+ - The `instance` name as a string
+
+```json
+"lain.com"
+```
+
## `GET /api/v1/pleroma/admin/statuses`
### Retrives all latest statuses
diff --git a/docs/development/API/differences_in_mastoapi_responses.md b/docs/development/API/differences_in_mastoapi_responses.md
index 6c1ecb559..0e6bcb79b 100644
--- a/docs/development/API/differences_in_mastoapi_responses.md
+++ b/docs/development/API/differences_in_mastoapi_responses.md
@@ -377,18 +377,6 @@ Pleroma is generally compatible with the Mastodon 2.7.2 API, but some newer feat
- `GET /api/v1/identity_proofs`: Returns an empty array, `[]`
-### Endorsements
-
-*Added in Mastodon 2.5.0*
-
-- `GET /api/v1/endorsements`: Returns an empty array, `[]`
-
-### Profile directory
-
-*Added in Mastodon 3.0.0*
-
-- `GET /api/v1/directory`: Returns HTTP 404
-
### Featured tags
*Added in Mastodon 3.0.0*
diff --git a/docs/development/API/nodeinfo.md b/docs/development/API/nodeinfo.md
new file mode 100644
index 000000000..0f998a1e6
--- /dev/null
+++ b/docs/development/API/nodeinfo.md
@@ -0,0 +1,347 @@
+# Nodeinfo
+
+See also [the Nodeinfo standard](https://nodeinfo.diaspora.software/).
+
+## `/.well-known/nodeinfo`
+### The well-known path
+* Method: `GET`
+* Authentication: not required
+* Params: none
+* Response: JSON
+* Example response:
+```json
+{
+ "links":[
+ {
+ "href":"https://example.com/nodeinfo/2.0.json",
+ "rel":"http://nodeinfo.diaspora.software/ns/schema/2.0"
+ },
+ {
+ "href":"https://example.com/nodeinfo/2.1.json",
+ "rel":"http://nodeinfo.diaspora.software/ns/schema/2.1"
+ }
+ ]
+}
+```
+
+## `/nodeinfo/2.0.json`
+### Nodeinfo 2.0
+* Method: `GET`
+* Authentication: not required
+* Params: none
+* Response: JSON
+* Example response:
+```json
+{
+ "metadata":{
+ "accountActivationRequired":false,
+ "features":[
+ "pleroma_api",
+ "mastodon_api",
+ "mastodon_api_streaming",
+ "polls",
+ "pleroma_explicit_addressing",
+ "shareable_emoji_packs",
+ "multifetch",
+ "pleroma:api/v1/notifications:include_types_filter",
+ "chat",
+ "shout",
+ "relay",
+ "pleroma_emoji_reactions",
+ "pleroma_chat_messages"
+ ],
+ "federation":{
+ "enabled":true,
+ "exclusions":false,
+ "mrf_hashtag":{
+ "federated_timeline_removal":[
+
+ ],
+ "reject":[
+
+ ],
+ "sensitive":[
+ "nsfw"
+ ]
+ },
+ "mrf_object_age":{
+ "actions":[
+ "delist",
+ "strip_followers"
+ ],
+ "threshold":604800
+ },
+ "mrf_policies":[
+ "ObjectAgePolicy",
+ "TagPolicy",
+ "HashtagPolicy"
+ ],
+ "quarantined_instances":[
+
+ ]
+ },
+ "fieldsLimits":{
+ "maxFields":10,
+ "maxRemoteFields":20,
+ "nameLength":512,
+ "valueLength":2048
+ },
+ "invitesEnabled":false,
+ "mailerEnabled":false,
+ "nodeDescription":"Pleroma: An efficient and flexible fediverse server",
+ "nodeName":"Example",
+ "pollLimits":{
+ "max_expiration":31536000,
+ "max_option_chars":200,
+ "max_options":20,
+ "min_expiration":0
+ },
+ "postFormats":[
+ "text/plain",
+ "text/html",
+ "text/markdown",
+ "text/bbcode"
+ ],
+ "private":false,
+ "restrictedNicknames":[
+ ".well-known",
+ "~",
+ "about",
+ "activities",
+ "api",
+ "auth",
+ "check_password",
+ "dev",
+ "friend-requests",
+ "inbox",
+ "internal",
+ "main",
+ "media",
+ "nodeinfo",
+ "notice",
+ "oauth",
+ "objects",
+ "ostatus_subscribe",
+ "pleroma",
+ "proxy",
+ "push",
+ "registration",
+ "relay",
+ "settings",
+ "status",
+ "tag",
+ "user-search",
+ "user_exists",
+ "users",
+ "web",
+ "verify_credentials",
+ "update_credentials",
+ "relationships",
+ "search",
+ "confirmation_resend",
+ "mfa"
+ ],
+ "skipThreadContainment":true,
+ "staffAccounts":[
+ "https://example.com/users/admin",
+ "https://example.com/users/staff"
+ ],
+ "suggestions":{
+ "enabled":false
+ },
+ "uploadLimits":{
+ "avatar":2000000,
+ "background":4000000,
+ "banner":4000000,
+ "general":16000000
+ }
+ },
+ "openRegistrations":true,
+ "protocols":[
+ "activitypub"
+ ],
+ "services":{
+ "inbound":[
+
+ ],
+ "outbound":[
+
+ ]
+ },
+ "software":{
+ "name":"pleroma",
+ "version":"2.4.1"
+ },
+ "usage":{
+ "localPosts":27,
+ "users":{
+ "activeHalfyear":129,
+ "activeMonth":70,
+ "total":235
+ }
+ },
+ "version":"2.0"
+}
+```
+
+## `/nodeinfo/2.1.json`
+### Nodeinfo 2.1
+* Method: `GET`
+* Authentication: not required
+* Params: none
+* Response: JSON
+* Example response:
+```json
+{
+ "metadata":{
+ "accountActivationRequired":false,
+ "features":[
+ "pleroma_api",
+ "mastodon_api",
+ "mastodon_api_streaming",
+ "polls",
+ "pleroma_explicit_addressing",
+ "shareable_emoji_packs",
+ "multifetch",
+ "pleroma:api/v1/notifications:include_types_filter",
+ "chat",
+ "shout",
+ "relay",
+ "pleroma_emoji_reactions",
+ "pleroma_chat_messages"
+ ],
+ "federation":{
+ "enabled":true,
+ "exclusions":false,
+ "mrf_hashtag":{
+ "federated_timeline_removal":[
+
+ ],
+ "reject":[
+
+ ],
+ "sensitive":[
+ "nsfw"
+ ]
+ },
+ "mrf_object_age":{
+ "actions":[
+ "delist",
+ "strip_followers"
+ ],
+ "threshold":604800
+ },
+ "mrf_policies":[
+ "ObjectAgePolicy",
+ "TagPolicy",
+ "HashtagPolicy"
+ ],
+ "quarantined_instances":[
+
+ ]
+ },
+ "fieldsLimits":{
+ "maxFields":10,
+ "maxRemoteFields":20,
+ "nameLength":512,
+ "valueLength":2048
+ },
+ "invitesEnabled":false,
+ "mailerEnabled":false,
+ "nodeDescription":"Pleroma: An efficient and flexible fediverse server",
+ "nodeName":"Example",
+ "pollLimits":{
+ "max_expiration":31536000,
+ "max_option_chars":200,
+ "max_options":20,
+ "min_expiration":0
+ },
+ "postFormats":[
+ "text/plain",
+ "text/html",
+ "text/markdown",
+ "text/bbcode"
+ ],
+ "private":false,
+ "restrictedNicknames":[
+ ".well-known",
+ "~",
+ "about",
+ "activities",
+ "api",
+ "auth",
+ "check_password",
+ "dev",
+ "friend-requests",
+ "inbox",
+ "internal",
+ "main",
+ "media",
+ "nodeinfo",
+ "notice",
+ "oauth",
+ "objects",
+ "ostatus_subscribe",
+ "pleroma",
+ "proxy",
+ "push",
+ "registration",
+ "relay",
+ "settings",
+ "status",
+ "tag",
+ "user-search",
+ "user_exists",
+ "users",
+ "web",
+ "verify_credentials",
+ "update_credentials",
+ "relationships",
+ "search",
+ "confirmation_resend",
+ "mfa"
+ ],
+ "skipThreadContainment":true,
+ "staffAccounts":[
+ "https://example.com/users/admin",
+ "https://example.com/users/staff"
+ ],
+ "suggestions":{
+ "enabled":false
+ },
+ "uploadLimits":{
+ "avatar":2000000,
+ "background":4000000,
+ "banner":4000000,
+ "general":16000000
+ }
+ },
+ "openRegistrations":true,
+ "protocols":[
+ "activitypub"
+ ],
+ "services":{
+ "inbound":[
+
+ ],
+ "outbound":[
+
+ ]
+ },
+ "software":{
+ "name":"pleroma",
+ "repository":"https://git.pleroma.social/pleroma/pleroma",
+ "version":"2.4.1"
+ },
+ "usage":{
+ "localPosts":27,
+ "users":{
+ "activeHalfyear":129,
+ "activeMonth":70,
+ "total":235
+ }
+ },
+ "version":"2.1"
+}
+```
+
diff --git a/docs/development/API/pleroma_api.md b/docs/development/API/pleroma_api.md
index 8f6422da0..2304291e5 100644
--- a/docs/development/API/pleroma_api.md
+++ b/docs/development/API/pleroma_api.md
@@ -37,7 +37,7 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
```
* Note: Same data as Mastodon API’s `/api/v1/custom_emojis` but in a different format
-## `/api/v1/pleroma/follow_import`
+## `/api/pleroma/follow_import`
### Imports your follows, for example from a Mastodon CSV file.
* Method: `POST`
* Authentication: required
@@ -46,7 +46,7 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
* Response: HTTP 200 on success, 500 on error
* Note: Users that can't be followed are silently skipped.
-## `/api/v1/pleroma/blocks_import`
+## `/api/pleroma/blocks_import`
### Imports your blocks.
* Method: `POST`
* Authentication: required
@@ -54,7 +54,7 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
* `list`: STRING or FILE containing a whitespace-separated list of accounts to block
* Response: HTTP 200 on success, 500 on error
-## `/api/v1/pleroma/mutes_import`
+## `/api/pleroma/mutes_import`
### Imports your mutes.
* Method: `POST`
* Authentication: required
@@ -70,7 +70,7 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
* Response: Provider specific JSON, the only guaranteed parameter is `type`
* Example response: `{"type": "kocaptcha", "token": "whatever", "url": "https://captcha.kotobank.ch/endpoint", "seconds_valid": 300}`
-## `/api/v1/pleroma/delete_account`
+## `/api/pleroma/delete_account`
### Delete an account
* Method `POST`
* Authentication: required
@@ -79,7 +79,7 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
* Response: JSON. Returns `{"status": "success"}` if the deletion was successful, `{"error": "[error message]"}` otherwise
* Example response: `{"error": "Invalid password."}`
-## `/api/v1/pleroma/disable_account`
+## `/api/pleroma/disable_account`
### Disable an account
* Method `POST`
* Authentication: required
@@ -88,21 +88,22 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
* Response: JSON. Returns `{"status": "success"}` if the account was successfully disabled, `{"error": "[error message]"}` otherwise
* Example response: `{"error": "Invalid password."}`
-## `/api/v1/pleroma/accounts/mfa`
+## `/api/pleroma/accounts/mfa`
#### Gets current MFA settings
* method: `GET`
* Authentication: required
* OAuth scope: `read:security`
-* Response: JSON. Returns `{"enabled": "false", "totp": false }`
+* Response: JSON. Returns `{"settings": {"enabled": "false", "totp": false }}`
+* Note: `enabled` is whether multi-factor auth is enabled for the user in general, while `totp` is one type of MFA.
-## `/api/v1/pleroma/accounts/mfa/setup/totp`
+## `/api/pleroma/accounts/mfa/setup/totp`
#### Pre-setup the MFA/TOTP method
* method: `GET`
* Authentication: required
* OAuth scope: `write:security`
* Response: JSON. Returns `{"key": [secret_key], "provisioning_uri": "[qr code uri]" }` when successful, otherwise returns HTTP 422 `{"error": "error_msg"}`
-## `/api/v1/pleroma/accounts/mfa/confirm/totp`
+## `/api/pleroma/accounts/mfa/confirm/totp`
#### Confirms & enables MFA/TOTP support for user account.
* method: `POST`
* Authentication: required
@@ -113,7 +114,7 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
* Response: JSON. Returns `{}` if the enable was successful, HTTP 422 `{"error": "[error message]"}` otherwise
-## `/api/v1/pleroma/accounts/mfa/totp`
+## `/api/pleroma/accounts/mfa/totp`
#### Disables MFA/TOTP method for user account.
* method: `DELETE`
* Authentication: required
@@ -123,7 +124,7 @@ The `/api/v1/pleroma/*` path is backwards compatible with `/api/pleroma/*` (`/ap
* Response: JSON. Returns `{}` if the disable was successful, HTTP 422 `{"error": "[error message]"}` otherwise
* Example response: `{"error": "Invalid password."}`
-## `/api/v1/pleroma/accounts/mfa/backup_codes`
+## `/api/pleroma/accounts/mfa/backup_codes`
#### Generstes backup codes MFA for user account.
* method: `GET`
* Authentication: required
@@ -159,10 +160,12 @@ See [Admin-API](admin_api.md)
"muting": false,
"muting_notifications": false,
"subscribing": true,
+ "notifying": true,
"requested": false,
"domain_blocking": false,
"showing_reblogs": true,
- "endorsed": false
+ "endorsed": false,
+ "note": ""
}
```
@@ -183,10 +186,12 @@ See [Admin-API](admin_api.md)
"muting": false,
"muting_notifications": false,
"subscribing": false,
+ "notifying": false,
"requested": false,
"domain_blocking": false,
"showing_reblogs": true,
- "endorsed": false
+ "endorsed": false,
+ "note": ""
}
```
@@ -327,7 +332,7 @@ See [Admin-API](admin_api.md)
}
```
-## `/api/v1/pleroma/change_email`
+## `/api/pleroma/change_email`
### Change account email
* Method `POST`
* Authentication: required