Skip to content

Latest commit

 

History

History
55 lines (47 loc) · 1.96 KB

README.md

File metadata and controls

55 lines (47 loc) · 1.96 KB

#Requirements
PHP > 5.5
OkayCMS = any version
Updated database (see: db_update.sql)
Configured timezone in php.ini, like: date.timezone ="Europe/Kiev"

#Description
REST api for OKAYCMS (Simpla CMS) based on Slim Framework

#Installation

  1. Put file RestAPI.php to api/ directory
  2. Add 'restapi' => 'RestAPI' to api/Okay.php
  3. Add to .htaccess file: RewriteRule ^rest/(.*)$ lib/RESTfull/v1/api/public/index.php [L,QSA]
  4. Copy code to lib/RESTfull/

#Available methods and parameters
Products:
rest/products/
rest/products/id/{id}
rest/products/category_id/{id}
rest/products/brand_id/{id}
rest/products/featured/{0|1}
rest/products/discounted/{0|1}
rest/products/in_stock/{0|1}
rest/products/has_images/{0|1}
URL parameters: limit, page, id, category_id, brand_id, featured, discounted, in_stock, has_images

Product:
/rest/product/{url}
/rest/product/{id}
URL parameters: none

Brands:

rest/brands/
rest/brands/category_id/{id}
rest/brands/product_id/{id}
URL parameters: visible, visible_brand, product_id, category_id

Brand:
/rest/brand/{url}
/rest/brand/{id}
URL parameters: none

Categories:
rest/categoreies/
rest/categoreies/product_id/{id}
rest/categoreies/level_depth/{level}
URL parameters: product_id, parent_id, level_depth

Variants:
/rest/variants/product_id/{id} /rest/variants/id/{id} /rest/variants/in_stock/{0|1} URL parameters: product_id, id, in_stock