» Users API

» Show a User

Shows details for a user. The ID for a user can be obtained from the Team endpoint. ?include=users should be included in the query string in order to have usernames be included in the response.

GET /users/:user_id

Status Response Reason
200 JSON API document (type: "users") The request was successful
401 JSON API error object Unauthorized
404 JSON API error object User not found, or unauthorized to view the user

» Sample Request

curl \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/vnd.api+json" \
  --request GET \
  https://app.terraform.io/api/v2/users/user-MA4GL63FmYRpSFxa

» Sample Response

{
  "data": {
    "id": "user-MA4GL63FmYRpSFxa",
    "type": "users",
    "attributes": {
      "username": "admin",
      "is-service-account": false,
      "avatar-url": "https://www.gravatar.com/avatar/fa1f0c9364253d351bf1c7f5c534cd40?s=100&d=mm",
      "v2-only": true,
      "permissions": {
        "can-create-organizations": false,
        "can-change-email": true,
        "can-change-username": true
      }
    },
    "relationships": {
      "authentication-tokens": {
        "links": {
          "related": "/api/v2/users/user-MA4GL63FmYRpSFxa/authentication-tokens"
        }
      }
    },
    "links": {
      "self": "/api/v2/users/user-MA4GL63FmYRpSFxa"
    }
  }
}