2pisoftware / cmfive

DEPRECATED! Please see https://github.com/2pisoftware/cmfive-core for new version
http://cmfive.com
4 stars 4 forks source link

add REST module updates with advanced url queries #180

Closed syntithenai closed 8 years ago

syntithenai commented 8 years ago

REST module.

[] indicates an optional value

<> indicate a required value

To start, you need an authentication token which can be retrieved from the by sending a GET request to token

/rest/token/?api=[&username=&password=]

Username and password are not required if there is already a logged in user

This token needs to be appended to every subsequent request.


To get a single record send a GET request to

/rest/index//id/?token=


To search/retrieve multiple records send a GET request to

/rest/index//[fieldname]/[value]?token=

Fields marked deleted are excluded from the list request, to access all records regardless of deleted status use the deleted request.

/rest/deleted//[fieldname]/[value]?token=

Both index and delete support advanced search criteria ie /rest/index//?token= where works as follows


To delete records, send a POST request to

/rest/delete//[id]?token=


To save records POST record data to

/rest/save//?token=