API Reference‎ > ‎People Service‎ > ‎

Resource: `all`

API Reference > People API

Resource: all

Provides access to functionality like search and registration.

Schema

{
  "_type": "all",
  "_links": {object},    // see links below
  "_actions": {object}   // see actions below
}

Links

Rel Description
self Link to the current resource.
home Link back to the root of the people api.

Actions

Action: get

Retrieve the links and actions available for all people.

Response

If successful, a all resource will be returned in the response body.


Action: search

Search for users by name or email.

Request Parameters
Parameter Type Location Required Description
name string query no First and/or last name of the person to search for.
email string query no Email address of the person to search for.
page int query no Used to page through large results sets and is used in conjunction with limit.
Default: 1 Min: 1
limit int query no The maximum number of results returned within a page.
Default: 10 Min: 0 Max: 100
sort string query no Space delimited string of properties to sort the results by.
Default: name.last name.first
Response
{
  "count": {number},        // number results returned
  "totalCount": {number},   // total number of results in the database
  "page": {number},         // page number of the results returned
  "pageCount": {number},    // total page count of all results based on current limit
  "startIndex": {number},   // index of the first result returned
  "endIndex": {number},     // index of the last results returned
  "results": [              // array of results
    {
      "username": {string},      // username of the found user
      "displayName": {string},   // preferred name of the user
      "name": {
        "first": {string},       // first name of the user
        "middle": {string},      // middle name of the user
        "last": {string},        // last name of the user
        "suffix": {string},      // name suffix of the user, e.g. Jr., III, etc.
        "short": {string},       // first name and last name of the user concatenated, e.g. "John Smith"
        "full": {string}         // all parts of the name concatenated, e.g. "John Robert Smith Jr."
      },
      "profileUrl": {string},    // URL to the user's public profile
      "photoUrl": {string}       // URL to the user's profile photo
    }
  ]
}

Action: register

Registers a new user with the given information.

Request Parameters
Parameter Type Location Required Description
firstName string body yes
lastName string body yes
email email body yes
password password body yes TODO: Add description
inviteToken string body no TODO: Add description
notifyInviter boolean body no TODO: Add description
Response
{
  "id": {string},            // id of the new user
  "username": {string},      // username of the new user
  "displayName": {string},   // preferred name of the user
  "name": {
    "first": {string},       // first name of the user
    "middle": {string},      // middle name of the user
    "last": {string},        // last name of the user
    "suffix": {string},      // name suffix of the user, e.g. Jr., III, etc.
    "short": {string},       // first name and last name of the user concatenated, e.g. "John Smith"
    "full": {string}         // all parts of the name concatenated, e.g. "John Robert Smith Jr."
  },
  "profileUrl": {string},    // URL to the user's public profile
  "photoUrl": {string}       // URL to the user's profile photo
}

Action: checkUsername

Use to check if a username is already taken.

Request Parameters
Parameter Type Location Required Description
username string body yes The username to check for.
Response
{
  "exists": {boolean}    // true if the username already exists
}

Action: checkEmail

Use to check if an email address is already associated with a user.

Request Parameters
Parameter Type Location Required Description
email string body yes The email address to check for.
Response
{
  "exists": {boolean}    // true if the email already exists
}

Comments