What Parameter in KREST I can use to set or get data from database

What Parameter I can use to get or set data from database with KREST ?

Adrian,

  1. login
    You wil have to login to CRM with KREST per GET method
    endpoint = [your site url]/KREST/login?user_name=[user name]&password=[md5 of your password]
    Example: http://localhost/myspicecrm/KREST/login?user_name=admin&password=b8a383899c1be0dd974fc597f19b668b

The login will return a session ID (id property)
{"id":"r4vin79ra6uislpd5smpncalv5","userid":"1","user_name":"admin","first_name":"","last_name":"Administrator"}

Pass this session ID to any other call

  1. to get a specific record by id
    endpoint = [your site url]/KREST/module/[module name]/[record id]
    method GET
    Use same url with method post to update a record.
    Example on Account
    endpoint= http://localhost/myspicecrm/KREST/module/Accounts/32b78947-0ab5-9cbe-5ddc-550838fa5558?session_id=r4vin79ra6uislpd5smpncalv5

  2. to create a record
    You have to provide an ID (a GUID) for the record. Have a look at include/utils.php function create_guid() to get an idea of how to generate one.
    In next KREST Release we will implement an endpoint to create a GUID.
    Use endpoint as in a GET but use POST

Documentation about KREST is being developed, should be issued this year.

Marvetal,

Thankyou very much. I have tried it and it’s succeed.