CMS Videos API

All reuqest will use the post method and request URL https://cms.manage.aniview.com/backend/graphql

1. Get Videos List

Retrieves a list of all Vidoes in the network.

Query:

query videos($orderBy: [QueryVideosOrderByOrderByClause!], $search: QueryVideosSearchWhereConditions, $hasPlaylists: QueryVideosHasPlaylistsWhereHasConditions, $status: [String!], $first: Int = 10, $page: Int) {videos(orderBy: $orderByfirst: $firstpage: $pagesearch: $searchhasPlaylists: $hasPlaylistsstatus: $status) {paginatorInfo {totalcountcurrentPagehasMorePages}data {nameiddurationcreatedAtupdatedAtuploadMethodstatusdescriptionisRegisterOnlysizesizeInPlayerflavors {encodingProgress}history {errorMessagedlTotalSizedlSizeSoFaruploadIndexuploadProgressprocessManagement {id}}thumbnail {urlByDimensionKey(key: "small")status}poster {status}}}}

Query variables:

{"first": 10,"orderBy": [{"column": "UPDATED_AT","order": "DESC"},{"column": "ID","order": "ASC"}],"search": {"OR": [{"column": "NAME","value": null,"operator": "LIKE"},{"column": "ID","value": ""}],"AND": []},"status": ["active","generating","error","archived"]}

Code Example:

const axios = require("axios"); const url = 'https://manage.aniview.com/api/token?format=json'; const payload = { "operationName": "videos", "variables": { "first": 10, "orderBy": [ { "column": "UPDATED_AT", "order": "DESC" }, { "column": "ID", "order": "ASC" } ], "search": { "OR": [ { "column": "NAME", "value": null, "operator": "LIKE" }, { "column": "ID", "value": "" } ], "AND": [] }, "status": [ "active", "generating", "error", "archived" ], "page": 1 }, "query": "query videos($orderBy: [QueryVideosOrderByOrderByClause!], $search: QueryVideosSearchWhereConditions, $hasPlaylists: QueryVideosHasPlaylistsWhereHasConditions, $status: [String!], $first: Int = 10, $page: Int) {\n videos(\n orderBy: $orderBy\n first: $first\n page: $page\n search: $search\n hasPlaylists: $hasPlaylists\n status: $status\n ) {\n paginatorInfo {\n total\n count\n currentPage\n hasMorePages\n }\n data {\n name\n id\n duration\n createdAt\n updatedAt\n uploadMethod\n status\n description\n isRegisterOnly\n size\n sizeInPlayer\n flavors {\n encodingProgress\n }\n history {\n errorMessage\n dlTotalSize\n dlSizeSoFar\n uploadIndex\n uploadProgress\n processManagement {\n id\n }\n }\n thumbnail {\n urlByDimensionKey(key: \"small\")\n status\n }\n poster {\n status\n }\n }\n }\n}" } axios.post(url, { 'id': 'email', 'password': 'password', 'accountId': 'accountId' }) .then((response) => { apiCall(response.data); }, (error) => { console.log(error); }); function apiCall(auth) { axios({ url: 'https://cms.manage.aniview.com/backend/graphql/', method: 'post', headers: { 'Cookie': 'token=' + auth.data.token }, data: payload }).then((result) => { console.log(result.data[0]); }); }

2. Register Videos (not uploading)

Register a video to Aniview. For users that would like to store videos on their own CDN.

Query:

Query variables:

Code Example:

3. Importing Videos (By Links)

Upload videos to the CMS that will be stored on the AniView CDN.

Query:

Query variables:

Code Example:

4. Update Video

Update a specific video

Query:

Query variables:

Code example:

5. Delete Video

Update a specific video

Query:

Query variables:

Code example: