Instance

Plugins

Managing plugins installed from a local path or from NPM, or search for new ones.

https://docs.joinpeertube.org/api/plugins

List plugins

GET
https://peertube2.cpy.re/api/v1/plugins

Parameters

pluginTypeintegerquery
uninstalledbooleanquery
startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

Response

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
namestring
Example
peertube-plugin-auth-ldap
typeinteger12
  • 1: PLUGIN
  • 2: THEME
latestVersionstring
Example
0.0.3
versionstring
Example
0.0.1
enabledboolean
uninstalledboolean
peertubeEnginestring
Example
2.2.0
descriptionstring
homepagestring<url>
Example
https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
settingsobject
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

List available plugins

GET
https://peertube2.cpy.re/api/v1/plugins/available

Parameters

searchstringquery
pluginTypeintegerquery
currentPeerTubeEnginestringquery
startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

sortstringquery

Sort column

Response

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
namestring
Example
peertube-plugin-auth-ldap
typeinteger12
  • 1: PLUGIN
  • 2: THEME
latestVersionstring
Example
0.0.3
versionstring
Example
0.0.1
enabledboolean
uninstalledboolean
peertubeEnginestring
Example
2.2.0
descriptionstring
homepagestring<url>
Example
https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
settingsobject
createdAtstring<date-time>
updatedAtstring<date-time>
503Service Unavailable

plugin index unavailable

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

Install a plugin

POST
https://peertube2.cpy.re/api/v1/plugins/install

Body

application/json
One of
npmNamestringrequired
Example
peertube-plugin-auth-ldap

Password of the authenticated user, required if password confirmation is enabled

pathstringrequired

Password of the authenticated user, required if password confirmation is enabled

Response

204No Content

successful operation

400Bad Request

should have either npmName or path set, or currentPassword is missing

403Forbidden

invalid currentPassword, or password confirmation unavailable for this user

429Too Many Requests

too many failed password confirmations

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

Update a plugin

POST
https://peertube2.cpy.re/api/v1/plugins/update

Body

application/json
One of
npmNamestringrequired
Example
peertube-plugin-auth-ldap

Password of the authenticated user, required if password confirmation is enabled

pathstringrequired

Password of the authenticated user, required if password confirmation is enabled

Response

204No Content

successful operation

400Bad Request

should have either npmName or path set, or currentPassword is missing

403Forbidden

invalid currentPassword, or password confirmation unavailable for this user

404Not Found

existing plugin not found

429Too Many Requests

too many failed password confirmations

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

Uninstall a plugin

POST
https://peertube2.cpy.re/api/v1/plugins/uninstall

Body

application/json
npmNamestringrequired

name of the plugin/theme in its package.json

Example
peertube-plugin-auth-ldap

Response

204No Content

successful operation

404Not Found

existing plugin not found

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

Get a plugin

GET
https://peertube2.cpy.re/api/v1/plugins/{npmName}

Parameters

npmNamestringrequiredpath

name of the plugin/theme on npmjs.com or in its package.json

Response

200OKPlugin

successful operation

Response fields application/json
namestring
Example
peertube-plugin-auth-ldap
typeinteger12
  • 1: PLUGIN
  • 2: THEME
latestVersionstring
Example
0.0.3
versionstring
Example
0.0.1
enabledboolean
uninstalledboolean
peertubeEnginestring
Example
2.2.0
descriptionstring
homepagestring<url>
Example
https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
settingsobject
createdAtstring<date-time>
updatedAtstring<date-time>
404Not Found

plugin not found

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

Set a plugin's settings

PUT
https://peertube2.cpy.re/api/v1/plugins/{npmName}/settings

Body

application/json
settingsobject

Parameters

npmNamestringrequiredpath

name of the plugin/theme on npmjs.com or in its package.json

Response

204No Content

successful operation

404Not Found

plugin not found

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

Get a plugin's public settings

GET
https://peertube2.cpy.re/api/v1/plugins/{npmName}/public-settings

Parameters

npmNamestringrequiredpath

name of the plugin/theme on npmjs.com or in its package.json

Response

200OKobject

successful operation

Response fields application/json
object
404Not Found

plugin not found

Get a plugin's registered settings

GET
https://peertube2.cpy.re/api/v1/plugins/{npmName}/registered-settings

Parameters

npmNamestringrequiredpath

name of the plugin/theme on npmjs.com or in its package.json

Response

200OKobject

successful operation

Response fields application/json
object
404Not Found

plugin not found

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