GET user/{userId}/rewards

Retrieve a list of rewards granted to a user.

Example

GET /api/v1/user/66a5db1f-2785-498d-9068-e24ddbba03f2/rewards HTTP/1.1
Accept: application/json
----------------------------------------
HTTP/1.1 200 OK
Content-Type: application/json
ETag: ...

[
  {
    "id": "3ad449b9-ee9f-4558-a547-e85943d99e8f",
    "name": "Test 01 Reward A",
    "kind": "emblem",
    "data": {
      "image": "protected/us-west-2:5f40aa7b-817d-4a9d-a92f-5cbfad3e6dc2/ec9fbd31-d78a-44ac-8566-3500cd1953bc.jpg",
      "color": "#00ff00"
    },
    "achievementKey": "test-01",
    "granted": 1559690124
  },
  {
    "id": "33587ceb-23b9-4f03-b4be-acaebe22bacb",
    "name": "Test 01 Reward B",
    "kind": "emblem",
    "data": {
      "image": "protected/us-west-2:5f40aa7b-817d-4a9d-a92f-5cbfad3e6dc2/ec9fbd31-d78a-44ac-8566-3500cd1953bc.jpg",
      "color": "#0000ff"
    },
    "achievementKey": "test-01",
    "granted": 1559690124
  }
]

Security

Authentication is required and access is restricted to the subject user.

URL Parameters

NONE

Query Parameters

NONE

Request Body

NONE

Response

Successful responses are code 200 with data in the response body. Error responses are standard.

Response Body

The response body is an Array of UserReward objects.

UserReward (extends Reward)

NameDescriptionValue
idthe ID of the reward, as a GUID with dashesstring
namethe name of the rewardstring
descriptionthe description of the rewardstring
kinda type discriminator for this rewardstring
datatype-specific data for this rewardobject
achievementKeythe key of the achievement with which this reward is associatedstring
grantedthe date and time when this reward was granted; as a Unix timestampnumber