GET /users/{userId}

Vrací detail jednoho uživatele podle jeho ID. Přístup jen pro admina a uživatele na vlastní profil.

Path parameters

  • userId string Required

    Unikátní ID uživatele

Responses

  • 200 application/json

    Detail uživatele načten.

    Hide response attributes Show response attributes object
    • id
    • username string
    • email string
  • 401 application/json

    Chyba autentizace

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 403 application/json

    Nedostatečná oprávnění

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 404 application/json

    Zdroj nenalezen

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 500 application/json

    Chyba serveru

    Hide response attributes Show response attributes object
    • code string
    • message string
GET /users/{userId}
curl \
 --request GET 'https://api.mstonjek.cz/v1/users/1234' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "id": "8d3f7e7a-6a6b-4b99-9b52-6f9d7d2a0a11",
  "username": "petr-jisa",
  "email": "mr@jisa.com"
}
Response examples (401)
{
  "code": "UNAUTHORIZED",
  "message": "Token není platný"
}
Response examples (403)
{
  "code": "FORBIDDEN",
  "message": "Nemáte oprávnění"
}
Response examples (404)
{
  "code": "NOT_FOUND",
  "message": "Zdroj uživatel 'user_123' nebyl nalezen."
}
Response examples (500)
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Server momentálně nedostupný"
}