cURL
curl --request GET \ --url https://api.example.com/users/@me/relationships \ --header 'Authorization: <authorization>'
{ "401": {}, "relationships": [ { "requester": { "id": "<string>", "username": "<string>", "status": 123 }, "requestee": { "id": "<string>", "username": "<string>", "status": 123 }, "status": "<string>" } ] }
Get all relationships (active and pending) for the current user
Bearer <token>
Show SafeRelationship
Show SafeUser
PENDING
ACCEPTED
{ "message": "Unauthorized" }
curl -X GET "http://localhost:8080/users/@me/relationships" \ -H "Authorization: Bearer your-jwt-token"
[ { "requester": { "id": "123e4567-e89b-12d3-a456-426614174000", "username": "alice", "status": 1 }, "requestee": { "id": "123e4567-e89b-12d3-a456-426614174001", "username": "bob", "status": 2 }, "status": "ACCEPTED" }, { "requester": { "id": "123e4567-e89b-12d3-a456-426614174002", "username": "charlie", "status": 0 }, "requestee": { "id": "123e4567-e89b-12d3-a456-426614174001", "username": "bob", "status": 2 }, "status": "PENDING" } ]