Cbk API

October 20, 2021 January 6, 2022
0 0 1237

Cbk API - an API plugin for Osclass that can be used to extract information from your site by users or activate, deactivate, block, unblock items and users by the admins.


The output will be in a JSON format for each case of usage.


Warning! This plugin will not insert or edit items/users, the plugin will only output the information in a JSON format with some extra option for admins keys but those keys will not add the option to insert or edit items/users.


This plugin accepts 2 types of accounts:



  • users - access keys that can retrieve information by items users categories and locations;

  • admins - access keys that can retrieve information by items and uses and make changes(delete, block, deactivate, mark);


Required parameters


The main access route that will return data with the following parameters


admin => Admin route (admin account key needed)


items => Return items information


users => Return users information


categories => Return categories information


locations => Return locations information


token => A unique key to authorize use of the API.


 


Route parameters


request => admin (An admin key is needed)

action => items - All items and action for specific item

itemAction => default - Will return all items



Accepted filters


userId => int - Filter by userId


userEmail => email - Filter by user email


iPage => int - Will return a specific page


itemsPerPage => int - Will set the number of results on page


 



itemAction => item - Will return a specific item based on parameter itemId=(int - required)


itemAction => unmarkSpam - Unmark item as spam, itemId=(int - required)


itemAction => markSpam - Mark item as spam, itemId=(int - required)


itemAction => unblock - Unblock item, itemId=(int - required)


itemAction => block - Block item, itemId=(int - required)


itemAction => unmarkPremium - Unmark item as premium, itemId=(int - required)


itemAction => markPremium - Mark item as premium, itemId=(int - required)


itemAction => delete - Delete item, itemId=(int - required)


itemAction => deactivate - Deactivate item, itemId=(int - required)


itemAction => activate - Activate item, itemId=(int - required)



 


action => users - All users and action for specific user

userAction => default - Will return all users



Accepted filters


userId => int - Filter by userId


userEmail => email - Filter by user email


iPage => int - Will return a specific page


itemsPerPage => int - Will set the number of results on page


 



userAction => user - Will return a specific user based on parameter userId=(int - required)


userAction => activate - Activate user, userId=(int - required)


userAction => deactivate - Deactivate user, userId=(int - required)


userAction => unblock - Unblock user, userId=(int - required)


userAction => block - Block user, userId=(int - required)


userAction => delete - delete user, userId=(int - required)



request => items

action => default - Will return all items

Accepted filters


userId => int - Filter by userId


userEmail => email - Filter by user email


sPattern => str - Filter by words in title and description


category => str/int - Filter by category name or id


country => str - Filter by country name or code


region => str/int - Filter by region name or id


city => str/int - Filter by city name or id


iPage => int - Will return a specific page


itemsPerPage => int - Will set the number of results on page


 



action => item - Will return a specific item based on parameter itemId=(int - required)


action => itemResources - Item resources, itemId=(int - required)


action => itemComments - Item comments, itemId=(int - required), iPage/itemsPerPage can be used


request => users

action => default - Will return all users



Accepted filters


userId => int - Filter by userId


userEmail => email - Filter by user email


iPage => int - Will return a specific page


itemsPerPage => int - Will set the number of results on page


 



action => user - Will return a specific user based on parameter userId=(int - required)


request => categories

action => default - Will return all categories in a tree


action => category - Will return a specific category base on category=(int/name - required)


action => subcategories - Will return a subcategories of a specific category based on category=(int/name - required)


request => locations

action => default - Will return all countries


action => country - Will return a specific country base on country=(code/slug/name - required)


action => regions - Will return regions from a specific country base on country=(code/slug/name - required)


action => cities - Will return cities from a specific region base on region=(slug/name - required)


action => region - Will return a specific region base on region=(slug/name - required)


action => city - Will return a specific city base on city=(slug/name - required)


To access all the information from above you need an access key that is provided by the site administrator.

Puneet Thakur October 20, 2021

will it work with osclasspoint and mindstellar ?

calinbehtuk Author October 20, 2021

I can't guarantee that. I made a minimal test on osclasspoint version and i see no issue but on mindstellar i made no test.
Subscribe
X

Subscribe!

Subscribe to get the latest listings, updates and special offers delivered directly in your inbox.