Categories

Get Categories by PID

This method fetch all categories by pid.
Method: GET
URL: /api/v3/categories
Required Params:

access_token (string required)
pid (int required)

Response example:
[
  {
    "id": 1125,
    "name": "vantage",
    "level": 0,
    "parent": 0
  },
  {
    "id": 1299,
    "name": "Vivos",
    "level": 0,
    "parent": 0
  },
  {
    "id": 1303,
    "name": "test videos",
    "level": 0,
    "parent": 0
  }
]

Get Content in a category id (cid)

This method fetch content in a category
Method: GET
URL: /api/v3/category/categoryId/:cid/contents
Required Params:

access_token (string required)
from (int optional)
limit (int optional maximum 100, default 50)

Response example:
[
  {
    "name": "noa video.mp4",
    "description": null,
    "content_id": 6089,
    "thumb": "",
    "categories": "1303",
    "tags": [],
    "status": "enabled",
    "gid": 1,
    "group_name": "Artear",
    "publisher_id": 2,
    "publisher_name": "Eltrece",
    "created_at": "2019-07-03 17:23:55",
    "created_by": "Jonathan Lowenstern",
    "content_type": "video",
    "external_id": "2-1303-JJRyeR1562185434734",
    "plays": 0,
    "impressions": 0
  },
  {
    "name": "noa video.mp4",
    "description": null,
    "content_id": 6088,
    "thumb": "",
    "categories": "1303",
    "tags": [],
    "status": "enabled",
    "gid": 1,
    "group_name": "Artear",
    "publisher_id": 2,
    "publisher_name": "Eltrece",
    "created_at": "2019-07-03 17:23:31",
    "created_by": "Jonathan Lowenstern",
    "content_type": "video",
    "external_id": "2-1303-57KTn01562185410721",
    "plays": 0,
    "impressions": 0
  }
]

 

Create new category

This method allows you to create a new category.
Method: POST
URL: /api/v3/category
Required Params: (JSON)

access_token (string required)
pid (int required)
name (string required)
level (int required)
parent (int optional)

Response example:
{
  "info": "Category created OK!",
  "cid": 1373
}

 

 

 

 

No Comments

Back to top