GET /api/users/{UserID}

Returns the overview of a user.

Authorization Roles/Permissions: Must be logged in. Self (logged in) or Site Admin (for any user).

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/users/{UserID}

Sample Request

The example below shows a request for the profile of a specific user.

Sample Request URL

https://{hostname}/api/users/681affee-6f50-4a6b-a455-9947b7511c6a.acmepaymentscorp

Sample request headers

Accept: application/json

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json
Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
UserID Path string Required The unique ID for a specific user.

Response

If successful, this operation returns HTTP status code 200, with the user profile of the specified user in JSON format.

Sample Response

The sample response below shows the user profile for the specified user.

Sample response headers #1

Status Code: 200 OK
Content-Type: application/json
Date: Wed, 21 Feb 2018 14:49:12 GMT

Sample response body #1: local user: application/json

{
  "UserID" : "7864b9f3-21d9-40a0-933d-fd63a8284705.acmepaymentscorp",
  "UserName" : "JaneMead",
  "FirstName" : "Jane",
  "LastName" : "Mead",
  "AuthIdentifier" : "",
  "Visibility" : "0",
  "Email" : "jane.mead@acmepaymentscorp.com",
  "Title" : "",
  "Industry" : "",
  "Language" : [ ],
  "Technology" : [ ],
  "Favorites" : "",
  "HasPicture" : false,
  "State" : "registered",
  "AvatarURL" : "http://<hostname?/api/users/7864b9f3-21d9-40a0-933d-fd63a8284705.acmepaymentscorp/avatar",
  "Domain" : "Local Domain",
  "LastLoginDate" : "2015-04-10T21:45:05Z",
  "Disabled" : false,
  "ProfileName" : "JaneMead",
  "UserIdentificationChallenges" : {
    "UserIdentificationChallenge" : [ {
      "UserID" : "7864b9f3-21d9-40a0-933d-fd63a8284705.acmepaymentscorp",
      "ChallengeCode" : "com.soa.challenge.question.city.birth",
      "ChallengeQuestion" : "What is the city of your birth?"
    }, {
      "UserID" : "7864b9f3-21d9-40a0-933d-fd63a8284705.acmepaymentscorp",
      "ChallengeCode" : "com.soa.challenge.question.color",
      "ChallengeQuestion" : "What is your favorite color?"
    }, {
      "UserID" : "7864b9f3-21d9-40a0-933d-fd63a8284705.acmepaymentscorp",
      "ChallengeCode" : "com.soa.challenge.question.petacmepaymentscorp
      "ChallengeQuestion" : "What is the name of your pet?"
    } ]
  },
  "LoginDomainID" : "siteusers.acmepaymentscorp",
  "ForcePasswordChangeOnLogin" : false,
  "Locked" : false
}

Sample response body #2: application/json

In the example below, the user is a new user added by the Site Admin who has not yet logged in. The challenge questions have not been set up and the user account has an ExpirationDate value. Custom workflow is in place, and a phone number has also been set up for the user.

{
  "UserID" : "c512cc0c-2b0d-47b2-aa69-99bbab02599c.acmepaymentscorp",
  "UserName" : "MaryMartinson",
  "FirstName" : "Mary",
  "LastName" : "Martinson",
  "AuthIdentifier" : "",
  "Visibility" : "0",
  "Email" : "mmartinson@acmepaymentscorp.com",
  "Title" : "",
  "Industry" : "",
  "Language" : [ ],
  "Technology" : [ ],
  "Favorites" : "",
  "AvatarProvider" : "com.soa.imageprovider.type.default",
  "HasPicture" : false,
  "State" : "registered",
  "AvatarURL" : "http://{hostname}/api/users/c512cc0c-2b0d-47b2-aa69-99bbab02599c.acmepaymentscorp/avatar",
  "Domain" : "Local Domain",
  "Disabled" : false,
  "ProfileName" : "MaryMartinson",
  "LoginDomainID" : "siteusers.acmepaymentscorp",
  "ForcePasswordChangeOnLogin" : true,
  "Locked" : false,
  "ExpirationDate" : "2015-05-11T00:58:49Z"
  "UserPhones" : {
    "UserPhone" : [ {
      "CountryCode" : "+1",
      "PhoneNumber" : "(123) 456-7890",
      "Verified" : false,
      "Primary" : false
    } ]
  }
}

Sample response headers #3: external domain user

 

Status Code: 200 OK
Content-Type: application/json
Date: Thu, 22 Feb 2018 16:14:44 GMT

Sample response body #3: external domain user

In this example, the user is logging in using an external login domain for authentication. The response includes some custom user claims as well as the defaults.

{
  "classifiers":{
  },
  "artifacts":{
  },
  "userClaims":{
    "ver":1,
    "zoneinfo":"America/Los_Angeles",
    "email_verified":true,
    "$EMAIL":"akanatest.jmead@gmail.com",
    "amr":[
      "pwd"
    ],
    "preferred_username":"akanatest.jmead@gmail.com",
    "locale":"en-US",
    "given_name":"akana",
    "$LASTNAME":"test",
    "$FIRSTNAME":"akana",
    "idp":"00odzpcprnEcd9RWr0h7",
    "updated_at":1519312545,
    "name":"akana test",
    "phone_number":"+1 1234567890",
    "$PHONE":"+1 1234567890",
    "family_name":"test",
    "email":"akanatest.jmead@gmail.com"
  },
  "UserID":"c4163fb2-a1e9-450e-9133-73cd574040f0.acmepaymentscorp",
  "UserName":"00udzqibovBYz5zzN0h7",
  "FirstName":"akana",
  "LastName":"test",
  "AuthIdentifier":"00udzqibovBYz5zzN0h7",
  "Visibility":"0",
  "Phone":"+1 0987654321",
  "Email":"akanatest.jmead@gmail.com",
  "Title":"",
  "Industry":"",
  "Language":[
  ],
  "Technology":[
  ],
  "Favorites":"",
  "AvatarProvider":"com.soa.imageprovider.type.default",
  "HasPicture":false,
  "State":"registered",
  "Updated":"2018-02-22T16:14:33Z",
  "AvatarURL":"http://acmepaymentscorp.com/api/users/avatar/_Vt2u4kU0h5PfXbBcMw1FfUw",
  "Domain":"OIDC",
  "LastLoginDate":"2018-02-22T16:14:33Z",
  "Disabled":false,
  "ProfileName":"akanatest",
  "LoginDomainID":"a8e2e0ef-f466-48ac-92bf-edc1256e77a0.acmepaymentscorp",
  "ForcePasswordChangeOnLogin":false,
  "Locked":false,
  "UserPhones":{
    "UserPhone":[
      {
        "CountryCode":"+1",
        "PhoneNumber":"0987654321",
        "Verified":true,
        "Primary":true
      }
    ]
  }
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json

Response Body

Name Type Description
User User Contains information about a platform user.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401

Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.

You would also get this response if you hadn't completed login before running the operation, or if you had the wrong UserID.

406 Not Acceptable. Returned if there is a problem with the request format. For example, you would get this if you specified an incorrect media type for the Accept header.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.