Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method

Url

Action

GET

/users

Get users data limiting 25.

GET

/users/1<ocid or ocid_hash>

Get data for user id 1. The user id can be a numeric value or a hash

GET

/users/lookup?1=user1@email.com&return=1,2

Lookup for user whose question id (1) is equal to supplied value. The users object returned will have value of questions 1 & 2. Here for example assumed to be firstname and last name.

Return parameter defines a csv of question id that are requested back in response.

POST

/users

Create a new users

Parameters required to create the user needs to be sent as post data in JSON format.

PUT

/users/1

Update user id 1. The user id can be a numeric value or a hash

Parameters required to update the user needs to be sent as post data in JSON format.

GET

/users/1/partners/2

Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.

POST

/users/login

Check to see user exist with username/email and password.

Parameters required to create JSON object with u as username, e as email and p as password and sent is as POST param.

Example:

{"u":"abc@one-count.com","e":"abc@one-count.com","p":"1234"}

OR

{"u":"abc@one-count.com","p":"1234"}

OR

{"e":"abc@one-count.com","p":"1234"}

OUTPUT : Should get ocid of the user if it finds it otherwise get and error with msg user not found.

...

Sample response for /users/25255449<OCID or ocid_hash>

Along with the demo in json format, the active packages and products of the user referred to as products and resources respectively are also returned.

...