The URL for REST API is
app.personyze.com/rest/{OBJECT}
Path parameters can be added to the request to select records by condition and sort the result.
If the first parameter is number, like in app.personyze.com/rest/placeholders/14, this number will be used as record Id. So this request asks for placeholder Id 14.
app.personyze.com/rest/{OBJECT}/{NUMBER}
It's possible to select by name or by any other available columns. The syntax will be
app.personyze.com/rest/{OBJECT}/where/{COLUMN}={VALUE}
One example:
curl 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/placeholders/where/name=Fake'
We put “=” sign between {COLUMN} and {VALUE}, but there are other operations available:
=
- equals!=
- doesn't equal>
- greater than<
- less than>=
- greater or equal<=
- less or equal:
- in comma-list of values!:
- not in comma-list of values
For several conditions that all must be met, use &
(“and” operator).
app.personyze.com/rest/{OBJECT}/where/{COLUMN1}={VALUE1}&{COLUMN2}={VALUE2}&...
For several conditions that at least one of them must be met, use |
(“or” operator).
app.personyze.com/rest/{OBJECT}/where/{COLUMN1}={VALUE1}|{COLUMN2}={VALUE2}|...
And you can combine both. “And” operator has higher precedence than “or”, like multiplication over addition in algebra. Parentheses are not supported.
app.personyze.com/rest/{OBJECT}/order_by/{COLUMN},{COLUMN},...
The resulting records will be sorted in ascending order by one or several columns.
app.personyze.com/rest/{OBJECT}/order_by_desc/{COLUMN},{COLUMN},...
In descending order.
app.personyze.com/rest/{OBJECT}/limit/{LIMIT}
After sorting you may want to get top several records.
app.personyze.com/rest/{OBJECT}/limit/{OFFSET},{LIMIT}
Skip {OFFSET} records, then get {LIMIT} records. So it's possible to implement pagination.
app.personyze.com/rest/{OBJECT}/columns/{COLUMN1},{COLUMN2},...
Without “columns”, API returns all available columns for given object.
app.personyze.com/rest/{OBJECT}/column/{COLUMN}
This changes format of resulting JSON value. The result will be 1-dimensional array of values of the given column. Normally (without “column”) it's array of JSON objects.