Wiki

REST Users object

For information about how REST API works, see rest main page.

Personyze tracks visitors on your site. When visitor's session ends (after 1.5 hours) all the collected information about this visitor is added to users database. Actually there can be additional delay of several hours.

You can see and manage users here.

REST "Users" object allows you to import users to Personyze from Your databases, and periodically update their information as desired.

The URL is:

app.personyze.com/rest/users

User records don't have fixed number of columns. It's possible to store any key-value pairs. You can store column names expressed in snake-case format (like first_name), or camel-case (like firstName).

Some columns have special meaning in Personyze, like "email", "first_name", etc. You can read them specifying /column/first_name or /column/firstName, but if you read all columns (without specifying /columns), they will appear in snake-case. Keep in mind, that in future Personyze can change which columns are special, and which are not.

Users can be identified by their user_id (Id that Personyze assigns), internal_id (you can store Id from your database), email, and fb_id (facebook Id number). If you insert a new user whose one of identifiers match another user already in database, the information will be merged.

Insert example

curl --data '{"first_name": "Johnny", "internal_id": "niceguy-561531", "email": "johnny@gmail.com"}' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users'

Now if you insert another record with "niceguy-561531", data will be merged.

curl --data '{"first_name": "Big John", "internal_id": "niceguy-561531", "email": "big-john@gmail.com"}' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users'

Select example

Get last modified record. Special column "data_last_modified" is automatically updated whenever some other column changes it's value.

curl 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/order_by_desc/data_last_modified/limit/1'

The same, but only select user Id, first name and email columns, using camel-case names:

curl 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/order_by_desc/data_last_modified/limit/1/columns/userId,firstName,email'

Update example

Update big-john@gmail.com so he has phone 202-555-0152.

curl -X PUT --data '{"phone": "202-555-0152"}' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/where/email=big-john@gmail.com'

Delete example

Delete "niceguy-561531" forever. There is really no way back.

curl -X DELETE 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/where/internal_id=niceguy-561531'
©2008-2023 All rights reserved. Personyze® is a registered trademark. Privacy Policy. Terms of Use.