diff --git a/support/doc/api/html/index.html b/support/doc/api/html/index.html index 0efc24f02..7e53ce675 100644 --- a/support/doc/api/html/index.html +++ b/support/doc/api/html/index.html @@ -25,13 +25,13 @@ Accounts
Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
+The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use PeerTube. No official SDK is currently provided.
+When you sign up for an account, you are given the possibility to generate sessions, and authenticate using this session token. One session token can currently be used at a time.
https://peertube.example.com/api/v1
+ In the header: - Authorization: Bearer mytoken + Authorization: Bearer <token>
+Authenticating via OAuth requires the following steps:
+Admin scope
+ moderator +Moderator scope
+ user +User scope
+Using some features of PeerTube require authentication, for which Accounts provide different levels of permission as well as associated user information. Accounts also encompass remote accounts discovered across the federation.
+Each server exposes public information regarding supported videos and options.
+Feeds of videos and feeds of comments allow to see updates and get them in an aggregator or script of your choice.
+Jobs are long-running tasks enqueued and processed by the instance itself. No additional worker registration is currently available.
+Managing servers which the instance interacts with is crucial to the concept of federation in PeerTube and external video indexation. The PeerTube server then deals with inter-server ActivityPub operations and propagates information across its social graph by posting activities to actors' inbox endpoints.
+User to create
- -{
- "username": "string",
- "password": "string",
- "email": "string",
- "videoQuota": "string",
- "role": "string"
-}
-
-
- successful operation
-{
- "id": "number",
- "uuid": "string"
-}
-
-
- Video abuses deal with reports of local or remote videos alike.
+[
{
"id": "number",
- "username": "string",
- "email": "string",
- "displayNSFW": "boolean",
- "autoPlayVideo": "boolean",
- "role": "string",
- "videoQuota": "number",
- "createdAt": "string",
- "account": {
+ "reason": "string",
+ "reporterAccount": {
"displayName": "string",
"id": "number",
"uuid": "string",
@@ -1737,461 +1745,13 @@
"updatedAt": "string"
}
},
- "videoChannels": [
- {
- "displayName": "string",
- "description": "string",
- "isLocal": "boolean",
- "ownerAccount": {
- "id": "number",
- "uuid": "string"
- }
- }
- ]
- }
-]
-
-
-
- - | - |
---|---|
- OAuth2 - | -- |
The user id
-Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
The user id
-successful operation
-{
- "id": "number",
- "username": "string",
- "email": "string",
- "displayNSFW": "boolean",
- "autoPlayVideo": "boolean",
- "role": "string",
- "videoQuota": "number",
- "createdAt": "string",
- "account": {
- "displayName": "string",
- "id": "number",
- "uuid": "string",
- "url": "string",
- "name": "string",
- "host": "string",
- "followingCount": "number",
- "followersCount": "number",
- "createdAt": "string",
- "updatedAt": "string",
- "avatar": {
- "path": "string",
- "createdAt": "string",
- "updatedAt": "string"
- }
- },
- "videoChannels": [
- {
- "displayName": "string",
- "description": "string",
- "isLocal": "boolean",
- "ownerAccount": {
- "id": "number",
- "uuid": "string"
- }
- }
- ]
-}
-
-
- - | - |
---|---|
- OAuth2 - | -- |
undefined
- -The user id
-{
- "id": "string",
- "email": "string",
- "videoQuota": "string",
- "role": "string"
-}
-
-
- Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
[
- {
- "id": "number",
- "username": "string",
- "email": "string",
- "displayNSFW": "boolean",
- "autoPlayVideo": "boolean",
- "role": "string",
- "videoQuota": "number",
- "createdAt": "string",
- "account": {
- "displayName": "string",
+ "video": {
"id": "number",
+ "name": "string",
"uuid": "string",
- "url": "string",
- "name": "string",
- "host": "string",
- "followingCount": "number",
- "followersCount": "number",
- "createdAt": "string",
- "updatedAt": "string",
- "avatar": {
- "path": "string",
- "createdAt": "string",
- "updatedAt": "string"
- }
+ "url": "string"
},
- "videoChannels": [
- {
- "displayName": "string",
- "description": "string",
- "isLocal": "boolean",
- "ownerAccount": {
- "id": "number",
- "uuid": "string"
- }
- }
- ]
+ "createdAt": "string"
}
]
@@ -2222,198 +1782,32 @@
undefined
- -{
- "password": "string",
- "email": "string",
- "displayNSFW": "string",
- "autoPlayVideo": "string"
-}
-
-
+ Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
successful operation
-"number"
-
-
- - | - |
---|---|
- OAuth2 - | -- |
The video id
+The video id or uuid
successful operation
-{
- "id": "string",
- "rating": "number"
-}
-
-
- - | - |
---|---|
- OAuth2 - | -- |
Offset
-Number of items
-Sort column (-createdAt for example)
-successful operation
-[
- {
- "id": "number",
- "uuid": "string",
- "createdAt": "string",
- "publishedAt": "string",
- "updatedAt": "string",
- "category": {
- "id": "number",
- "label": "string"
- },
- "licence": {
- "id": "number",
- "label": "string"
- },
- "language": {
- "id": "string",
- "label": "string"
- },
- "privacy": "string",
- "description": "string",
- "duration": "number",
- "isLocal": "boolean",
- "name": "string",
- "thumbnailPath": "string",
- "previewPath": "string",
- "embedPath": "string",
- "views": "number",
- "likes": "number",
- "dislikes": "number",
- "nsfw": "boolean",
- "account": {
- "name": "string",
- "displayName": "string",
- "url": "string",
- "host": "string",
- "avatar": {
- "path": "string",
- "createdAt": "string",
- "updatedAt": "string"
- }
- }
- }
-]
-
-
- - | - |
---|---|
- OAuth2 - | -- |
undefined
- -{
- "username": "string",
- "password": "string",
- "email": "string"
-}
-
-
- The file to upload.
-successful operation
-{
- "path": "string",
- "createdAt": "string",
- "updatedAt": "string"
-}
-
-
- Operations dealing with listing, uploading, fetching or modifying videos.
+The name of the account (chocobozzz or + chocobozzz@peertube.cpy.re for example)
+successful operation
+{
+ "id": "number",
+ "uuid": "string",
+ "createdAt": "string",
+ "publishedAt": "string",
+ "updatedAt": "string",
+ "category": {
+ "id": "number",
+ "label": "string"
+ },
+ "licence": {
+ "id": "number",
+ "label": "string"
+ },
+ "language": {
+ "id": "string",
+ "label": "string"
+ },
+ "privacy": "string",
+ "description": "string",
+ "duration": "number",
+ "isLocal": "boolean",
+ "name": "string",
+ "thumbnailPath": "string",
+ "previewPath": "string",
+ "embedPath": "string",
+ "views": "number",
+ "likes": "number",
+ "dislikes": "number",
+ "nsfw": "boolean",
+ "account": {
+ "name": "string",
+ "displayName": "string",
+ "url": "string",
+ "host": "string",
+ "avatar": {
+ "path": "string",
+ "createdAt": "string",
+ "updatedAt": "string"
+ }
+ }
+}
+
+
+ The search helps to find + videos from within the instance and beyond. Videos from other instances federated by the instance (that is, instances followed by the instance) can be found via keywords and other criteria of the advanced search.
+Sort column (-createdAt for example)
successful operation
-[
- {
- "id": "number",
- "reason": "string",
- "reporterAccount": {
- "displayName": "string",
- "id": "number",
- "uuid": "string",
- "url": "string",
- "name": "string",
- "host": "string",
- "followingCount": "number",
- "followersCount": "number",
- "createdAt": "string",
- "updatedAt": "string",
- "avatar": {
- "path": "string",
- "createdAt": "string",
- "updatedAt": "string"
- }
- },
- "video": {
- "id": "number",
- "name": "string",
- "uuid": "string",
- "url": "string"
- },
- "createdAt": "string"
- }
-]
-
-
- - | - |
---|---|
- OAuth2 - | -- |
The video id or uuid
-Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
The video id or uuid
-Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
The video id or uuid
-Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
Offset
-Number of items
-Sort column (-createdAt for example)
+String to search
successful operation
-[
- {
- "id": "number",
- "videoId": "number",
- "createdAt": "string",
- "updatedAt": "string",
- "name": "string",
- "uuid": "string",
- "description": "string",
- "duration": "number",
- "views": "number",
- "likes": "number",
- "dislikes": "number",
- "nsfw": "boolean"
- }
-]
-
-
- - | - |
---|---|
- OAuth2 - | -- |
Offset
-Number of items
-Sort column (-createdAt for example)
-successful operation
-[
- {
- "displayName": "string",
- "description": "string",
- "isLocal": "boolean",
- "ownerAccount": {
- "id": "number",
- "uuid": "string"
- }
- }
-]
-
-
- undefined
- -{
- "name": "string",
- "description": "string"
-}
-
-
- Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
The video channel id or uuid
-successful operation
-{
- "displayName": "string",
- "description": "string",
- "isLocal": "boolean",
- "ownerAccount": {
- "id": "number",
- "uuid": "string"
- }
-}
-
-
- undefined
- -The video channel id or uuid
-{
- "name": "string",
- "description": "string"
-}
-
-
- Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
The video channel id or uuid
-Successful operation
-- | - |
---|---|
- OAuth2 - | -- |
The video channel id or uuid
-{
- "id": "number",
- "uuid": "string",
- "createdAt": "string",
- "publishedAt": "string",
- "updatedAt": "string",
- "category": {
- "id": "number",
- "label": "string"
- },
- "licence": {
- "id": "number",
- "label": "string"
- },
- "language": {
- "id": "string",
- "label": "string"
- },
- "privacy": "string",
- "description": "string",
- "duration": "number",
- "isLocal": "boolean",
- "name": "string",
- "thumbnailPath": "string",
- "previewPath": "string",
- "embedPath": "string",
- "views": "number",
- "likes": "number",
- "dislikes": "number",
- "nsfw": "boolean",
- "account": {
- "name": "string",
- "displayName": "string",
- "url": "string",
- "host": "string",
- "avatar": {
- "path": "string",
- "createdAt": "string",
- "updatedAt": "string"
- }
- }
-}
-
-
- The name of the account (chocobozzz or - chocobozzz@peertube.cpy.re for example)
-successful operation
-[
{
- "displayName": "string",
- "description": "string",
- "isLocal": "boolean",
- "ownerAccount": {
+ "id": "number",
+ "uuid": "string",
+ "createdAt": "string",
+ "publishedAt": "string",
+ "updatedAt": "string",
+ "category": {
"id": "number",
- "uuid": "string"
+ "label": "string"
+ },
+ "licence": {
+ "id": "number",
+ "label": "string"
+ },
+ "language": {
+ "id": "string",
+ "label": "string"
+ },
+ "privacy": "string",
+ "description": "string",
+ "duration": "number",
+ "isLocal": "boolean",
+ "name": "string",
+ "thumbnailPath": "string",
+ "previewPath": "string",
+ "embedPath": "string",
+ "views": "number",
+ "likes": "number",
+ "dislikes": "number",
+ "nsfw": "boolean",
+ "account": {
+ "name": "string",
+ "displayName": "string",
+ "url": "string",
+ "host": "string",
+ "avatar": {
+ "path": "string",
+ "createdAt": "string",
+ "updatedAt": "string"
+ }
}
}
]
@@ -5425,6 +3594,11 @@
Operations dealing with comments to a video. Comments are organized in threads.
+Operations dealing with creation, modification and video listing of a user's channels.
+Offset
+Number of items
+Sort column (-createdAt for example)
+successful operation
+[
+ {
+ "displayName": "string",
+ "description": "string",
+ "isLocal": "boolean",
+ "ownerAccount": {
+ "id": "number",
+ "uuid": "string"
+ }
+ }
+]
+
+
+ undefined
+ +{
+ "name": "string",
+ "description": "string"
+}
+
+
+ Successful operation
++ | + |
---|---|
+ OAuth2 + | ++ |
The video id or uuid
+The video channel id or uuid
+successful operation
+{
+ "displayName": "string",
+ "description": "string",
+ "isLocal": "boolean",
+ "ownerAccount": {
+ "id": "number",
+ "uuid": "string"
+ }
+}
+
+
+ undefined
+ +The video channel id or uuid
+{
+ "name": "string",
+ "description": "string"
+}
+
+
+ Successful operation
++ | + |
---|---|
+ OAuth2 + | ++ |
The video channel id or uuid
The video channel id or uuid
+successful operation
+{
+ "id": "number",
+ "uuid": "string",
+ "createdAt": "string",
+ "publishedAt": "string",
+ "updatedAt": "string",
+ "category": {
+ "id": "number",
+ "label": "string"
+ },
+ "licence": {
+ "id": "number",
+ "label": "string"
+ },
+ "language": {
+ "id": "string",
+ "label": "string"
+ },
+ "privacy": "string",
+ "description": "string",
+ "duration": "number",
+ "isLocal": "boolean",
+ "name": "string",
+ "thumbnailPath": "string",
+ "previewPath": "string",
+ "embedPath": "string",
+ "views": "number",
+ "likes": "number",
+ "dislikes": "number",
+ "nsfw": "boolean",
+ "account": {
+ "name": "string",
+ "displayName": "string",
+ "url": "string",
+ "host": "string",
+ "avatar": {
+ "path": "string",
+ "createdAt": "string",
+ "updatedAt": "string"
+ }
+ }
+}
+
+
+ The name of the account (chocobozzz or + chocobozzz@peertube.cpy.re for example)
+successful operation
+[
+ {
+ "displayName": "string",
+ "description": "string",
+ "isLocal": "boolean",
+ "ownerAccount": {
+ "id": "number",
+ "uuid": "string"
+ }
+ }
+]
+
+
+ User to create
+ +{
+ "username": "string",
+ "password": "string",
+ "email": "string",
+ "videoQuota": "string",
+ "role": "string"
+}
+
+
+ successful operation
+{
+ "id": "number",
+ "uuid": "string"
+}
+
+
+ Sort column (-createdAt for example)
successful operation
+[
+ {
+ "id": "number",
+ "username": "string",
+ "email": "string",
+ "displayNSFW": "boolean",
+ "autoPlayVideo": "boolean",
+ "role": "string",
+ "videoQuota": "number",
+ "createdAt": "string",
+ "account": {
+ "displayName": "string",
+ "id": "number",
+ "uuid": "string",
+ "url": "string",
+ "name": "string",
+ "host": "string",
+ "followingCount": "number",
+ "followersCount": "number",
+ "createdAt": "string",
+ "updatedAt": "string",
+ "avatar": {
+ "path": "string",
+ "createdAt": "string",
+ "updatedAt": "string"
+ }
+ },
+ "videoChannels": [
+ {
+ "displayName": "string",
+ "description": "string",
+ "isLocal": "boolean",
+ "ownerAccount": {
+ "id": "number",
+ "uuid": "string"
+ }
+ }
+ ]
+ }
+]
+
+
+ + | + |
---|---|
+ OAuth2 + | ++ |
The user id
+Successful operation
+The user id
+successful operation
+{
+ "id": "number",
+ "username": "string",
+ "email": "string",
+ "displayNSFW": "boolean",
+ "autoPlayVideo": "boolean",
+ "role": "string",
+ "videoQuota": "number",
+ "createdAt": "string",
+ "account": {
+ "displayName": "string",
+ "id": "number",
+ "uuid": "string",
+ "url": "string",
+ "name": "string",
+ "host": "string",
+ "followingCount": "number",
+ "followersCount": "number",
+ "createdAt": "string",
+ "updatedAt": "string",
+ "avatar": {
+ "path": "string",
+ "createdAt": "string",
+ "updatedAt": "string"
+ }
+ },
+ "videoChannels": [
+ {
+ "displayName": "string",
+ "description": "string",
+ "isLocal": "boolean",
+ "ownerAccount": {
+ "id": "number",
+ "uuid": "string"
+ }
+ }
+ ]
+}
+
+
+ + | + |
---|---|
+ OAuth2 + | ++ |
undefined
+ +The user id
+{
+ "id": "string",
+ "email": "string",
+ "videoQuota": "string",
+ "role": "string"
+}
+
+
+ Successful operation
++ | + |
---|---|
+ OAuth2 + | ++ |
[
+ {
+ "id": "number",
+ "username": "string",
+ "email": "string",
+ "displayNSFW": "boolean",
+ "autoPlayVideo": "boolean",
+ "role": "string",
+ "videoQuota": "number",
+ "createdAt": "string",
+ "account": {
+ "displayName": "string",
+ "id": "number",
+ "uuid": "string",
+ "url": "string",
+ "name": "string",
+ "host": "string",
+ "followingCount": "number",
+ "followersCount": "number",
+ "createdAt": "string",
+ "updatedAt": "string",
+ "avatar": {
+ "path": "string",
+ "createdAt": "string",
+ "updatedAt": "string"
+ }
+ },
+ "videoChannels": [
+ {
+ "displayName": "string",
+ "description": "string",
+ "isLocal": "boolean",
+ "ownerAccount": {
+ "id": "number",
+ "uuid": "string"
+ }
+ }
+ ]
+ }
+]
+
+
+ + | + |
---|---|
+ OAuth2 + | ++ |
undefined
+ +{
+ "password": "string",
+ "email": "string",
+ "displayNSFW": "string",
+ "autoPlayVideo": "string"
+}
+
+
+ Successful operation
++ | + |
---|---|
+ OAuth2 + | ++ |
successful operation
+"number"
+
+
+ + | + |
---|---|
+ OAuth2 + | ++ |
The video id
+successful operation
+{
+ "id": "string",
+ "rating": "number"
+}
+
+
+ + | + |
---|---|
+ OAuth2 + | ++ |
String to search
+Offset
+Number of items
+Sort column (-createdAt for example)
+ | + |
---|---|
+ OAuth2 + | ++ |
undefined
+ +{
+ "username": "string",
+ "password": "string",
+ "email": "string"
+}
+
+
+ Successful operation
+The file to upload.
+successful operation
+{
+ "path": "string",
+ "createdAt": "string",
+ "updatedAt": "string"
+}
+
+
+ + | + |
---|---|
+ OAuth2 + | ++ |
The video id or uuid
+Successful operation
+The video id or uuid
+Successful operation
+Offset
+Number of items
+Sort column (-createdAt for example)
+successful operation
+[
+ {
+ "id": "number",
+ "videoId": "number",
+ "createdAt": "string",
+ "updatedAt": "string",
+ "name": "string",
+ "uuid": "string",
+ "description": "string",
+ "duration": "number",
+ "views": "number",
+ "likes": "number",
+ "dislikes": "number",
+ "nsfw": "boolean"
+ }
+]
+
+
+ The video id or uuid
+Successful operation
++ | + |
---|---|
+ OAuth2 + | ++ |