/
CMS Playlist API

CMS Playlist API

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

1. Get Playlist List

Get list of all Playlists

Query:

query playlists($first: Int!, $orderBy: [QueryPlaylistsOrderByOrderByClause!], $page: Int, $search: QueryPlaylistsSearchWhereConditions, $status: [String!], $ids: [ID!]) { playlists( orderBy: $orderBy first: $first page: $page search: $search status: $status ids: $ids ) { paginatorInfo { total count currentPage } data { name id duration createdAt updatedAt method status description thumbnail { urlByDimensionKey(key: "small") status } poster { status } videos { id } } } }

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", "archived" ], "page": 1 }

Code Example:

const axios = require("axios"); const url = 'https://manage.aniview.com/api/token?format=json'; const payload = { "operationName": "playlists", "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", "archived" ], "page": 1 }, "query": "query playlists($first: Int!, $orderBy: [QueryPlaylistsOrderByOrderByClause!], $page: Int, $search: QueryPlaylistsSearchWhereConditions, $status: [String!], $ids: [ID!]) {\n playlists(\n orderBy: $orderBy\n first: $first\n page: $page\n search: $search\n status: $status\n ids: $ids\n ) {\n paginatorInfo {\n total\n count\n currentPage\n }\n data {\n name\n id\n duration\n createdAt\n updatedAt\n method\n status\n description\n thumbnail {\n urlByDimensionKey(key: \"small\")\n status\n }\n poster {\n status\n }\n videos {\n id\n }\n }\n }\n}" } axios.post(url, { 'id': 'id', '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. Create Playlist

Create a new Playlist

Query:

Query variables:

Code Example:

3. Update Playlist

Update a specific Playlist

Query:

Query variables:

Code example:

4. Delete Playlist

Delete a specific Playlist

Query:

Query variables:

Code example:

Related content

CMS Feed API
CMS Feed API
More like this
CMS Videos API
CMS Videos API
More like this
Advertiser API
Advertiser API
More like this
Macros
Macros
Read with this
CMS Contextual Filters API
CMS Contextual Filters API
More like this
CMS Basic Guide
CMS Basic Guide
Read with this