Users API Demo



API Documentation

List of the all available calls and the expected data to be sent and received. All of the data must be sent via the POST protocol.


CREATE

Adds a new user to the database.
url: http://demo-users-api.goldenorbs.com/api/create

Expected parameters:

Expected result:
{
   type: "success",
   message: "Created new user with ID: ?"
}
READ

Read user from the database using his `email` field as a key.
url: http://demo-users-api.goldenorbs.com/api/read

Expected parameters:

Expected result:
{
   type: "success",
   message: "User found!",
   data: {
      id: "1",
      email: "your@email.com",
      givenName: "John",
      familyName: "Smith",
      created: "2018-12-16 07:49:49"
   }
}

UPDATE

Updates user's data in the database using `id` field as a key.
url: http://demo-users-api.goldenorbs.com/api/update

Expected parameters:

Expected result:
{
   type: "success",
   message: "Updated existing user with ID: 1"
}
DELETE

Deletes user from the database using his `id` field as a key.
url: http://demo-users-api.goldenorbs.com/api/delete

Expected parameters:

Expected result:
{
   type: "success",
   message: "Deleted existing user with ID: 1"
}

LIST

Read user's list from the database. As a option you can determine the start position of the listing, and the limit of the results.
Both parameters (`start`, and `limit`) are optional, and they accept "0" as a parameter too.
url: http://demo-users-api.goldenorbs.com/api/list

Expected parameters:

Expected result:
[
    {
        id: 1,
        email: "your@email.com",
        givenName: "John",
        familyName: "Smith",
        created: "2018-12-16 09:39:30"
    },
    {
        id: 1,
        email: "another@email.com",
        givenName: "Jenny",
        familyName: "Jones",
        created: "2018-12-16 11:01:00"
    },
]