Skip to content

How To Use the RESTful API and Add new Endpoints

♚ PH⑦ de Soria™♛ edited this page Jun 1, 2020 · 12 revisions

Basic Info to Start

Add new Endpoints

  • You can add new endpoints by adding new methods into the User Controller of the "api" module.

How to Call an API endpoint

  • You can call a method easily like the following for retrieving the data of a specific user (user method)

GET http://YOUR-SITE.com/api/user/user/<ID_NUMBER>/

Replace "YOUR-SITE.com" by your URL and "<ID_NUMBER>" by the ID of the User.

Finally, don't forget to send the following GET/POST API parameters

  • private_api_key parameter with your api key as the value (you api key can be found in your ~/_protected/app/configs/config.ini file)
  • url parameter with ph7cms.com as the value

Depending of the API request called, it can be GET or POST

Useful Dev Software