Wiki

REST request path parameters

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.

Select by record Id

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}

"Where": Select by other column

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.

"Order_by": Sort the result

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.

"Limit": How many records to get

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.

"Columns": Get only specific columns for each record

app.personyze.com/rest/{OBJECT}/columns/{COLUMN1},{COLUMN2},...

Without "columns", API returns all available columns for given object.

"Column": Get only one specific column

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.

©2008-2023 All rights reserved. Personyze® is a registered trademark. Privacy Policy. Terms of Use.