Description

Get a user's profile groups

Parameters

Name Type Required Optional Searchable Note
userid numeric REQUIRED, Passed via URI
firstname string via search string
groupname string via search string
lastname string via search string

Examples

Example Request

http://devsandbox.targetsolutions.com/v1/users/{userid}/groups

Example Request with Search String

http://devsandbox.targetsolutions.com/v1/users/{userid}/groups?q={"firstname":"random firstname","groupname":"random groupname","lastname":"random lastname"}

Example Header

GET /users/{userid}/groups HTTP/1.1
Host: http://devsandbox.targetsolutions.com/v1
AccessToken: Sa4F4hwJzOtVUL+sLiB8Tg==
Cache-Control: no-cache

Possible Results Sets

Results Set

{
  "groups":[
    {
      "links":{
        "resourcelink":"http://qa-api.targetsafety.local/v1/sites/12/categories/profile/15464/groups/319119"
      },
      "usercount":6,
      "groupid":319119,
      "siteid":12,
      "categoryid":15464,
      "groupname":"group a"
    }
  ],
  "pagination":{
    "next":"http://qa-api.targetsafety.local/v1/users/15981/groups?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"
}