Moderation

Server Blocklist

List blocked accounts by server

GET
https://peertube2.cpy.re/api/v1/server/blocklist/accounts

Parameters

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

subscriptionNamestringquery

Response

200OKobject

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
byAccountActor & any
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

blockedAccountActor & any
Show child attributes
idid>= 1
Example
42

Same fields as data.byAccount.userId

urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

Show child attributes
idid>= 1
Example
42

Same fields as data.byAccount.userId

namestring
urlstring<url>
createdAtstring<date-time>

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

Block an account by server

POST
https://peertube2.cpy.re/api/v1/server/blocklist/accounts

Body

application/json
accountNamestringrequired

account to block, in the form username@domain

Example
chocobozzz@example.org

Response

200OK

successful operation

409Conflict

self-blocking forbidden

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

Unblock an account by server

DELETE
https://peertube2.cpy.re/api/v1/server/blocklist/accounts/{accountName}

Parameters

accountNamestringrequiredpath

account to unblock, in the form username@domain

Response

201Created

successful operation

404Not Found

account or account block does not exist

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

List blocked servers by server

GET
https://peertube2.cpy.re/api/v1/server/blocklist/servers

Parameters

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

subscriptionNamestringquery

Response

200OKobject

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
byAccountActor & any
Show child attributes
idid>= 1
Example
42
urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

blockedServerobject
Show child attributes
hoststring<hostname>
Show child attributes
idid>= 1
Example
42

Same fields as data.byAccount.userId

namestring
urlstring<url>
createdAtstring<date-time>

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

Block a server by server

POST
https://peertube2.cpy.re/api/v1/server/blocklist/servers

Body

application/json
hoststring<hostname>required

server domain to block

Response

204No Content

successful operation

409Conflict

self-blocking forbidden

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

Unblock a server by server

DELETE
https://peertube2.cpy.re/api/v1/server/blocklist/servers/{host}

Parameters

hoststring<hostname>requiredpath

server domain to unblock

Response

204No Content

successful operation

404Not Found

server block does not exist

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

List server blocklist subscriptions

GET
https://peertube2.cpy.re/api/v1/server/blocklist/subscriptions

Parameters

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

searchstringquery

Plain text search, applied to various parts of the model depending on endpoint

Response

200OKobject

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
idid>= 1
Example
42
namestring
urlstring<url>
mutedAccountsCountinteger>= 0
mutedServersCountinteger>= 0
lastSyncAtstring<date-time>
createdAtstring<date-time>
updatedAtstring<date-time>

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

Add a server blocklist subscription

POST
https://peertube2.cpy.re/api/v1/server/blocklist/subscriptions

Body

application/json
urlstring<url>required

Response

successful operation

Response fields application/json
idid>= 1
Example
42
namestring
urlstring<url>
mutedAccountsCountinteger>= 0
mutedServersCountinteger>= 0
lastSyncAtstring<date-time>
createdAtstring<date-time>
updatedAtstring<date-time>
409Conflict

subscription already exists

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

Delete a server blocklist subscription

DELETE
https://peertube2.cpy.re/api/v1/server/blocklist/subscriptions/{id}

Parameters

idintegerrequiredpath

Response

204No Content

successful operation

404Not Found

subscription does not exist

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.

Scopes: admin

List publicly shared server blocklist log entries

GET
https://peertube2.cpy.re/api/v1/server/blocklist/public-log

Parameters

startDatestring<date-time>requiredquery

Response

successful operation

Response fields application/json
namestring
actionsArray<object>
Show child attributes
typestringblockunblock
targetstring
createdAtstring<date-time>
403Forbidden

public log is disabled