REST ======================================= API Standard Response. --------------------------------------- - ``success`` : the call succeeded - ``code`` : an array of response codes - ``data : data`` : an array of objects returned from the database. - ``data : total_rows`` : the total number of rows you have access to. - ``data : returned_rows`` : the number of rows returned by this call. - ``data : private_key`` : the private key used to encode urls and other items. It will be sent only once. - ``data : public_key`` : the public key. It can be used to authenticate calls. - ``data : next`` : the url for the next set of object. It will be null if there is no more object to retrieve. Only for GET calls. - ``data : prev`` : the url for the previous set of object. It will be null if there on the first page. Only for GET calls. - ``debug : warnings`` : null | an array of warnings. - ``debug : errors`` : null | an array of errors. - ``supported`` : based on version of api being requested (200 = supported, 100 = deprecated, 0 = not supported). The REST API come with a standard response:: { success: true, code: [], data: [ { ... }, { ... }, ], total_rows: 2, returned_rows: 2, private_key: null, public_key: null } You can get the results sorted in ascending or descending order by any indexable fields by using ``_asc[] = field`` or ``_desc[] = field``. In addition of the standard response above a debug array can be accessible when passing ``_debug = true`` in the url parameters:: { success: false, code: [703], data: [ { ... }, { ... }, ], total_rows: 2, returned_rows: 2, private_key: null, public_key: null, debug: { warnings: null, errors: ['email must not be null'] } } HTTP Request Methods ----------------------------------------- * ``GET`` : The GET method does not require any URL parameters; it will filter by what the user have access to. If using parameters, they will need to be in the URL query string:: http://{{environment.url}}/user?_gt[updated_on]=1434234342&_gt[created_on]=1434234342 * ``POST`` : The POST method create a new object. Parameters for the POST method have to be in the body in form URL-encoded or sent as multipart/form-data if sending an image for upload. * ``PUT`` : The PUT method replaces the whole object in the database. It is not to be confused with PATCH which is a partial update. For the PUT method, parameters have to be in the body in form URL-encoded or sent as multipart/form-data if sending an image for upload. * ``PATCH`` : The PATCH method is similar to PUT put is a partial object update. The parameters for the PATCH method has to be in the body in form URL-encoded or sent as multipart/form-data if sending an image for upload. * ``DELETE`` : The delete method takes no parameters. The id of the object to be deleted in stuck at the end of the URL. This will delete the organization with id 3:: http://{{environment.url}}/organization/3 Comparison Operators ----------------------------------------- Each indexed parameter has comparison and filtering methods available. * ``equal`` : equal can be used in two different ways either like a regular url argument or using a array syntax using ``_equal[]``:: http://{{environment.url}}/member?_version=3.2&email=vero@busybusy.com http://{{environment.url}}/member?_version=3.2&_equal[email]=vero@busybusy.com * ``not equal`` : using array syntax ``_not_equal[]``:: http://{{environment.url}}/member?_version=3.2&_not_equal[email]=vero@busybusy.com * ``in`` : using array syntax ``_in[]``:: http://{{environment.url}}/member?_version=3.2&_in[email][]=vero@busybusy.com&_in[email][]=vero.bis@busybusy.com * ``not in`` : using array syntax ``_not_in[]``:: http://{{environment.url}}/member?_version=3.2&_not_in[email][]=vero@busybusy.com&_not_in[email][]=vero.bis@busybusy.com * ``greater than`` : using array syntax ``_gt[]``:: http://{{environment.url}}/member?_version=3.2&_gt[email]=vero@busybusy.com * ``greater than or equal`` : using array syntax ``_gte[]``:: http://{{environment.url}}/member?_version=3.2&_gte[email]=vero@busybusy.com * ``less than`` : using array syntax ``_lt[]``:: http://{{environment.url}}/member?_version=3.2&_lt[email]=vero@busybusy.com * ``less than or equal`` : using array syntax ``_lte[]``:: http://{{environment.url}}/member?_version=3.2&_lte[email]=vero@busybusy.com * ``null`` : using special string ``_-NULL-_``:: http://{{environment.url}}/member?_version=3.2&email=_-NULL-_ * ``not null`` : using special string ``!_-NULL-_``:: http://{{environment.url}}/member?_version=3.2&email=!_-NULL-_ .. toctree:: :maxdepth: 2