GET user/{userId}/friends

Get a user's friends. This is a faceted view with the following facets:

Facet Examples

GET /api/v1/user/66a5db1f-2785-498d-9068-e24ddbba03f2/friends HTTP/1.1
Accept: application/json
Authorization: Bearer ...
----------------------------------------
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
ETag: ...

[
  {
    "id": "9de127d6-cd4a-4bfd-8653-e3c52754d547",
    "username": "ironman",
    "avatar": null,
    "emblem": null,
    "profile": "I am...",
    "online": true,
    "activity": "Making a Suit",
    "party": {
      "id": "90a25e5b-cd98-4314-8180-c27718181dc8",
      "name": "Avengers",
      "maxPlayers": 8,
      "currentPlayers" 7,
    }
  },
  {
    "id": "68d9c44f-d505-4316-bf81-89183ee390fb",
    "username": "cap",
    "avatar": null,
    "emblem": null,
    "online": false,
  },
  {
    "id": "9f75424e-d6e7-494e-9e36-c6f47e614ba6",
    "username": "hulk",
    "avatar": "protected/us-west-2:5f40aa7b-817d-4a9d-a92f-5cbfad3e6dc2/ec9fbd31-d78a-44ac-8566-3500cd1953bc.jpg",
    "emblem": null,
    "online": true,
    "activity": "Being Green",
  }
]

Security

Authentication is required. Access is restricted to the user and system processes.

URL Parameters

NameDescriptionValue
userIdthe ID of the user as a GUID with dashesstring

Query Parameters

NameDescriptionValue
facetselect a facet to return; default 'info' optional
one of:
  • info
  • id

Request Body

NONE

Response

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

Response Body: info facet

The response body is an array of FriendInfo objects.

FriendInfo (extends UserInfo)

NameDescriptionValue
idthe ID of the user as a GUID with dashesstring
usernamethe user's username, which is uniquestring
avatara media path to the user's avatar image file; will be null if no avatar has been setstring or null
emblemthe GUID of an emblem to display with the user's avatar, or null if none is selectedstring or null
profilea text description of this user, if public optionalstring
onlinewhether or not this player is onlineboolean
activitya text description of the player's current activity if they are online optionalstring
partyonly defined if this player is currently the leader of a party, includes party details optionalParty

Party

NameDescriptionValue
idthe ID of the party as a GUID with dashesstring
namethe name of the partystring
maxPlayersthe maximum number of players allowed in the partynumber
currentPlayersthe current number of players in the partynumber

Response Body: id facet

The response body is an array of the user's friends' IDs (strings). They are GUIDs with dashes.