diff --git a/docs/development/API/admin_api.md b/docs/development/API/admin_api.md index 7d31ee262f..b55892e99b 100644 --- a/docs/development/API/admin_api.md +++ b/docs/development/API/admin_api.md @@ -1751,3 +1751,70 @@ Note that this differs from the Mastodon API variant: Mastodon API only returns ```json {} ``` + +## `GET /api/v1/pleroma/admin/domains` + +### List of domains + +- Response: JSON, list of domains + +```json +[ + { + "id": "1", + "domain": "example.org", + "public": false, + "resolves": true, + "last_checked_at": "2023-11-17T12:13:05" + } +] +``` + +## `POST /api/v1/pleroma/admin/domains` + +### Create a domain + +- Params: + - `domain`: string, required, domain name + - `public`: boolean, optional, defaults to false, whether it is possible to register an account under the domain by everyone + +- Response: JSON, created announcement + +```json +{ + "id": "1", + "domain": "example.org", + "public": true, + "resolves": false, + "last_checked_at": null +} +``` + +## `POST /api/v1/pleroma/admin/domains/:id` + +### Change domain publicity + +- Params: + - `public`: boolean, whether it is possible to register an account under the domain by everyone + +- Response: JSON, updated domain + +```json +{ + "id": "1", + "domain": "example.org", + "public": false, + "resolves": true, + "last_checked_at": "2023-11-17T12:13:05" +} +``` + +## `DELETE /api/v1/pleroma/admin/domains/:id` + +### Delete a domain + +- Response: JSON, empty object + +```json +{} +``` diff --git a/docs/development/API/differences_in_mastoapi_responses.md b/docs/development/API/differences_in_mastoapi_responses.md index 48a9c104c3..8228f67acd 100644 --- a/docs/development/API/differences_in_mastoapi_responses.md +++ b/docs/development/API/differences_in_mastoapi_responses.md @@ -298,6 +298,7 @@ Has these additional parameters (which are the same as in Pleroma-API): - `captcha_answer_data`: optional, contains provider-specific captcha data - `token`: invite token required when the registrations aren't public. - `language`: optional, user's preferred language for receiving emails (digest, confirmation, etc.), default to the language set in the `userLanguage` cookies or `Accept-Language` header. +- `domain`: optional, domain id, if multitenancy is enabled. ## Instance diff --git a/uploads/.gitignore b/uploads/.gitignore new file mode 100644 index 0000000000..523e584a70 --- /dev/null +++ b/uploads/.gitignore @@ -0,0 +1,3 @@ +# Git will ignore everything in this directory except this file. +* +!.gitignore