Description

Get a user's credential assignments

Parameters

Name Type Required Optional Searchable Note
userid numeric REQUIRED, Passed via URI
startdate datetime via search string
expirationdate datetime via search string
credentialnumber string via search string
attachmentcount numeric via search string
notes string via search string
status string via search string
firstname string via search string
lastname string via search string

Examples

Example Request

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

Example Request with Search String

http://devsandbox.targetsolutions.com/v1/users/{userid}/credentials?q={"startdate":"random startdate","expirationdate":"random expirationdate","credentialnumber":"random credentialnumber","attachmentcount":"random attachmentcount","notes":"random notes","status":"random status","firstname":"random firstname","lastname":"random lastname"}

Example Header

GET /users/{userid}/credentials HTTP/1.1
Host: http://devsandbox.targetsolutions.com/v1
AccessToken: iHY78CindJfYPS/S7eDtAA==
Cache-Control: no-cache

Possible Results Sets

Results Set

{
  "Credentials":[
    {
      "expirationdate":"10/20/2011",
      "credentialid":10241,
      "startdate":"10/01/2011",
      "link":"http://devsandbox.targetsolutions.com/v1/credentials/10241/assignments/10241-484703",
      "credentialnumber":"",
      "status":"active",
      "attachmentcount":0,
      "notes":""
    }
  ],
  "pagination":{
    "next":"http://devsandbox.targetsolutions.com/v1/users/484703/credentials?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"
}