Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
normandy
pleroma
Commits
286632df
Verified
Commit
286632df
authored
6 years ago
by
Haelwenn
Browse files
Options
Downloads
Patches
Plain Diff
Add docs/Admin-API.md
[ci skip]
parent
33e3a7ba
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/Admin-API.md
+100
-0
100 additions, 0 deletions
docs/Admin-API.md
docs/Pleroma-API.md
+4
-1
4 additions, 1 deletion
docs/Pleroma-API.md
mix.exs
+1
-1
1 addition, 1 deletion
mix.exs
with
105 additions
and
2 deletions
docs/Admin-API.md
0 → 100644
+
100
−
0
View file @
286632df
# Admin API
Authentication is required and the user must be an admin.
## `/api/pleroma/admin/user`
### Remove a user
*
Method
`DELETE`
*
Params:
*
`nickname`
*
Response: User’s nickname
### Create a user
*
Method:
`POST`
*
Params:
*
`nickname`
*
`email`
*
`password`
*
Response: User’s nickname
## `/api/pleroma/admin/users/tag`
### Tag a list of users
*
Method:
`PUT`
*
Params:
*
`nickname`
*
`tags`
### Untag a list of users
*
Method:
`DELETE`
*
Params:
*
`nickname`
*
`tags`
## `/api/pleroma/admin/permission_group/:nickname`
### Get user user permission groups membership
*
Method:
`GET`
*
Params: none
*
Response:
```
JSON
{
"is_moderator": bool,
"is_admin": bool
}
```
## `/api/pleroma/admin/permission_group/:nickname/:permission_group`
Note: Available
`:permission_group`
is currently moderator and admin. 404 is returned when the permission group doesn’t exist.
### Get user user permission groups membership
*
Method:
`GET`
*
Params: none
*
Response:
```
JSON
{
"is_moderator": bool,
"is_admin": bool
}
```
### Add user in permission group
*
Method:
`POST`
*
Params: none
*
Response:
*
On failure:
``{"error": "…"}``
*
On success: JSON of the
``user.info``
### Remove user from permission group
*
Method:
`DELETE`
*
Params: none
*
Response:
*
On failure:
``{"error": "…"}``
*
On success: JSON of the
``user.info``
*
Note: An admin cannot revoke their own admin status.
## `/api/pleroma/admin/relay`
### Follow a Relay
*
Methods:
`POST`
*
Params:
*
`relay_url`
*
Response:
*
On success: URL of the followed relay
### Unfollow a Relay
*
Methods:
`DELETE`
*
Params:
*
`relay_url`
*
Response:
*
On success: URL of the unfollowed relay
## `/api/pleroma/admin/invite_token`
### Get a account registeration invite token
*
Methods:
`GET`
*
Params: none
*
Response: invite token (base64 string)
## `/api/pleroma/admin/email_invite`
### Sends registration invite via email
*
Methods:
`POST`
*
Params:
*
`email`
*
`name`
, optionnal
## `/api/pleroma/admin/password_reset`
### Get a password reset token for a given nickname
*
Methods:
`GET`
*
Params: none
*
Response: password reset token (base64 string)
This diff is collapsed.
Click to expand it.
docs/Pleroma-API.md
+
4
−
1
View file @
286632df
...
...
@@ -92,4 +92,7 @@ Request parameters can be passed via [query strings](https://en.wikipedia.org/wi
"statusnet_blocking": false,
"statusnet_profile_url": "https://pleroma.soykaf.com/users/lain"
}
```
\ No newline at end of file
```
## `/api/pleroma/admin/`…
See
[
Admin-API
](
Admin-API.md
)
This diff is collapsed.
Click to expand it.
mix.exs
+
1
−
1
View file @
286632df
...
...
@@ -21,7 +21,7 @@ defmodule Pleroma.Mixfile do
homepage_url:
"https://pleroma.social/"
,
docs:
[
logo:
"priv/static/static/logo.png"
,
extras:
[
"README.md"
,
"docs/config.md"
,
"docs/Pleroma-API.md"
],
extras:
[
"README.md"
,
"docs/config.md"
,
"docs/Pleroma-API.md"
,
"docs/Admin-API.md"
],
main:
"readme"
,
output:
"priv/static/doc"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment