Person API

From TeamServer ER/Studio
Jump to: navigation, search

Go Up to API Reference

This part of the Team Server API allows you to work with People.

GET v1/people

Obtains a list of people.

If successful, the response from the server provides a list of People with details about each one of them.

GET v1/people/<id>

Obtains information about the People with the specified ID.

PUT v1/businessterms/<id>

Updates the information of a term. Your request can provide any combination of the following fields:

  • firstname
  • title
  • jobDescription
  • email
  • aliases
  • phoneNumber
  • isStreamPosteable
  • isStreamCommentable
  • isCurrentUserFollowing

Person Fields

Person resources may provide the following fields:

Item Example Description

"id"

"1"

An integer that uniquely identifies the person.

"email"

"admin@local.com"

The email address of this person.

"isStreamCommentable"

true

States if the stream may be commented.

"createdAt"

1401981576

The date when the person was created, in Unix time (seconds since 1970).

"verified"

true

The user is verified as ok to use the system.

"link"

"/viewUser.ext?id\u003d2"

Path relative to the Team Server root URL that points to the person.

"useName"

"admin"

Person Username.

"isStreamPosteable"

true

States if users can post on the stream.

"firstName"

"admin"

The given name (first name) of this person.

"type"

"Person"

The type of the resource. Its value is always "person" for person resources.

"url"

"/v1/people/1"

Path relative to the Team Server root API URL that points to the entry of the person resource. For example, if the Team Server root API URL is http://teamserver.example.com/api , the example value here determines that you can access the person resource at http://teamserver.example.com/api/v1/people/1 .

Example Response

This is an example response from a GET v1/people call:

{
  "metadata_": {
    "limit": 25,
    "totalCount": 2,
    "offset": 0
  },
"people":
   [
       {
           "id": 1,
           "isStreamCommentable": true,
           "email": "admin@local.com",
           "verified": true,
           "createdAt": 1401981576,
           "link": "/viewUser.ext?id=2",
           "userName": "admin",
           "isStreamPosteable": true,
           "type": "Person",
           "firstName": "admin",
           "url": "/v1/people/1"
       },
       {
           "id": 2,
           "isCurrentUserFollowing": false,
           "isStreamCommentable": true,
           "email": "myusername@example.com",
           "verified": true,
           "createdAt": 1408532694,
           "link": "/viewUser.ext?id=4",
           "userName": "myusername",
           "isStreamPosteable": true,
           "type": "Person",
           "firstName": "myusername",
           "url": "/v1/people/2"
       }
   ]

This is an example response from a GET v1/people/<id> call:

{
  "person": {
    "id": 1,
    "email": "admin@local.com",
    "isStreamCommentable": true,
    "createdAt": 1401981576,
    "verified": true,
    "link": "/viewUser.ext?id\u003d2",
    "userName": "admin",
    "isStreamPosteable": true,
    "firstName": "admin",
    "type": "Person",
    "url": "/v1/people/1"
  }
}

See Also