Description

Get all users in a site

Parameters

Name Type Required Optional Searchable Note
siteid numeric REQUIRED, Passed via URI
username string via search string
firstname string via search string
lastname string via search string
status string via search string
employeeid string via search string
usertype string via search string

Examples

Example Request

http://devsandbox.targetsolutions.com/v1/sites/{siteid}/users

Example Request with Search String

http://devsandbox.targetsolutions.com/v1/sites/{siteid}/users?q={"username":"random username","firstname":"random firstname","lastname":"random lastname","status":"random status","employeeid":"random employeeid","usertype":"random usertype"}

Example Header

GET /sites/{siteid}/users HTTP/1.1
Host: http://devsandbox.targetsolutions.com/v1
AccessToken: 32bM/VOPwyUAZ3E8Kbig4g==
Cache-Control: no-cache

Possible Results Sets

Results Set

{
  "users":[
    {
      "links":{
        "credentials":"http://devsandbox.targetsolutions.com/v1/users/714479/credentials",
        "resourcelink":"http://devsandbox.targetsolutions.com/v1/users/714479",
        "access/modules":"http://devsandbox.targetsolutions.com/v1/users/714479/access/modules",
        "groups":"http://devsandbox.targetsolutions.com/v1/users/714479/groups",
        "access/groups":"http://devsandbox.targetsolutions.com/v1/users/714479/access/groups"
      },
      "firstname":"Not",
      "usertype":"Supervisor",
      "siteid":12,
      "employeeid":"",
      "email":[
        
      ],
      "username":"sadf",
      "status":"Active",
      "lastname":12,
      "userid":714479
    }
  ],
  "pagination":{
    "next":"http://devsandbox.targetsolutions.com/v1/users?startrow=2&limit=1"
  }
}

No Results Set

{
  "httpcode":200,
  "moreinfo":"http://developers.targetsolutions.com/v1/responsecodes/901",
  "developermessage":"The request returned zero results.",
  "statuscode":901,
  "status":"ok"
}

Access Denied Set

{
  "httpcode":401,
  "moreinfo":"http://developers.targetsolutions.com/v1/responsecodes/800",
  "developermessage":"A request was made to a resource that you do not have ownership of.",
  "statuscode":800,
  "status":"access denied"
}