Return the team_user specified by the :id parameter

settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/teams_users/3
200
{
  "id": 3,
  "team_id": 3,
  "user_id": 108,
  "created_at": "2017-11-22T13:41:28.680Z",
  "validated": true,
  "leader": true,
  "occurrence": 0,
  "team": {
    "id": 3,
    "name": "podamer2's group",
    "url": "https://api.intra.42.fr/v2/teams/3",
    "final_mark": null,
    "project_id": 5,
    "created_at": "2017-11-22T13:41:28.661Z",
    "updated_at": "2017-11-22T13:41:28.704Z",
    "status": "creating_group",
    "terminating_at": null,
    "users": [
      {
        "id": 108,
        "login": "podamer2",
        "url": "https://api.intra.42.fr/v2/users/podamer2",
        "leader": true,
        "occurrence": 0,
        "validated": true,
        "projects_user_id": 3
      }
    ],
    "locked?": false,
    "validated?": null,
    "closed?": false,
    "repo_url": null,
    "repo_uuid": "intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3",
    "locked_at": null,
    "closed_at": null,
    "project_session_id": 5
  },
  "user": {
    "id": 108,
    "login": "podamer2",
    "url": "https://api.intra.42.fr/v2/users/podamer2"
  }
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/teams_users/3"

{
  "id": 3,
  "team_id": 3,
  "user_id": 108,
  "created_at": "2017-11-22T13:41:28.680Z",
  "validated": true,
  "leader": true,
  "occurrence": 0,
  "team": {
    "id": 3,
    "name": "podamer2's group",
    "url": "https://api.intra.42.fr/v2/teams/3",
    "final_mark": null,
    "project_id": 5,
    "created_at": "2017-11-22T13:41:28.661Z",
    "updated_at": "2017-11-22T13:41:28.704Z",
    "status": "creating_group",
    "terminating_at": null,
    "users": [
      {
        "id": 108,
        "login": "podamer2",
        "url": "https://api.intra.42.fr/v2/users/podamer2",
        "leader": true,
        "occurrence": 0,
        "validated": true,
        "projects_user_id": 3
      }
    ],
    "locked?": false,
    "validated?": null,
    "closed?": false,
    "repo_url": null,
    "repo_uuid": "intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3",
    "locked_at": null,
    "closed_at": null,
    "project_session_id": 5
  },
  "user": {
    "id": 108,
    "login": "podamer2",
    "url": "https://api.intra.42.fr/v2/users/podamer2"
  }
}
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

response = token.get("/v2/teams_users/3")
response.status
# => 200
response.parsed
# => {"id"=>3, "team_id"=>3, "user_id"=>108, "created_at"=>"2017-11-22T13:41:28.680Z", "validated"=>true, "leader"=>true, "occurrence"=>0, "team"=>{"id"=>3, "name"=>"podamer2's group", "url"=>"https://api.intra.42.fr/v2/teams/3", "final_mark"=>nil, "project_id"=>5, "created_at"=>"2017-11-22T13:41:28.661Z", "updated_at"=>"2017-11-22T13:41:28.704Z", "status"=>"creating_group", "terminating_at"=>nil, "users"=>[{"id"=>108, "login"=>"podamer2", "url"=>"https://api.intra.42.fr/v2/users/podamer2", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>3}], "locked?"=>false, "validated?"=>nil, "closed?"=>false, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3", "locked_at"=>nil, "closed_at"=>nil, "project_session_id"=>5}, "user"=>{"id"=>108, "login"=>"podamer2", "url"=>"https://api.intra.42.fr/v2/users/podamer2"}}