settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/projects_users/18
200
{
  "id": 18,
  "occurrence": 0,
  "final_mark": null,
  "status": "waiting_for_correction",
  "validated?": null,
  "current_team_id": 18,
  "project": {
    "id": 1,
    "name": "Libft",
    "slug": "libft",
    "parent_id": null
  },
  "cursus_ids": [
    1
  ],
  "user": {
    "id": 25,
    "login": "bhutt",
    "url": "https://api.intra.42.fr/v2/users/bhutt"
  },
  "teams": [
    {
      "id": 18,
      "name": "bhutt's group",
      "url": "https://api.intra.42.fr/v2/teams/18",
      "final_mark": null,
      "project_id": 1,
      "created_at": "2017-11-22T13:41:30.835Z",
      "updated_at": "2017-11-22T13:41:30.920Z",
      "status": "waiting_for_correction",
      "terminating_at": null,
      "users": [
        {
          "id": 25,
          "login": "bhutt",
          "url": "https://api.intra.42.fr/v2/users/bhutt",
          "leader": true,
          "occurrence": 0,
          "validated": true,
          "projects_user_id": 18
        }
      ],
      "locked?": true,
      "validated?": null,
      "closed?": true,
      "repo_url": null,
      "repo_uuid": "intra-uuid-0d4153cd-21b7-4f1a-a526-297314ddc61d-18",
      "locked_at": "2017-11-22T13:41:30.895Z",
      "closed_at": "2017-11-22T13:41:30.919Z",
      "project_session_id": 1
    }
  ]
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/projects_users/18"

{
  "id": 18,
  "occurrence": 0,
  "final_mark": null,
  "status": "waiting_for_correction",
  "validated?": null,
  "current_team_id": 18,
  "project": {
    "id": 1,
    "name": "Libft",
    "slug": "libft",
    "parent_id": null
  },
  "cursus_ids": [
    1
  ],
  "user": {
    "id": 25,
    "login": "bhutt",
    "url": "https://api.intra.42.fr/v2/users/bhutt"
  },
  "teams": [
    {
      "id": 18,
      "name": "bhutt's group",
      "url": "https://api.intra.42.fr/v2/teams/18",
      "final_mark": null,
      "project_id": 1,
      "created_at": "2017-11-22T13:41:30.835Z",
      "updated_at": "2017-11-22T13:41:30.920Z",
      "status": "waiting_for_correction",
      "terminating_at": null,
      "users": [
        {
          "id": 25,
          "login": "bhutt",
          "url": "https://api.intra.42.fr/v2/users/bhutt",
          "leader": true,
          "occurrence": 0,
          "validated": true,
          "projects_user_id": 18
        }
      ],
      "locked?": true,
      "validated?": null,
      "closed?": true,
      "repo_url": null,
      "repo_uuid": "intra-uuid-0d4153cd-21b7-4f1a-a526-297314ddc61d-18",
      "locked_at": "2017-11-22T13:41:30.895Z",
      "closed_at": "2017-11-22T13:41:30.919Z",
      "project_session_id": 1
    }
  ]
}
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/projects_users/18")
response.status
# => 200
response.parsed
# => {"id"=>18, "occurrence"=>0, "final_mark"=>nil, "status"=>"waiting_for_correction", "validated?"=>nil, "current_team_id"=>18, "project"=>{"id"=>1, "name"=>"Libft", "slug"=>"libft", "parent_id"=>nil}, "cursus_ids"=>[1], "user"=>{"id"=>25, "login"=>"bhutt", "url"=>"https://api.intra.42.fr/v2/users/bhutt"}, "teams"=>[{"id"=>18, "name"=>"bhutt's group", "url"=>"https://api.intra.42.fr/v2/teams/18", "final_mark"=>nil, "project_id"=>1, "created_at"=>"2017-11-22T13:41:30.835Z", "updated_at"=>"2017-11-22T13:41:30.920Z", "status"=>"waiting_for_correction", "terminating_at"=>nil, "users"=>[{"id"=>25, "login"=>"bhutt", "url"=>"https://api.intra.42.fr/v2/users/bhutt", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>18}], "locked?"=>true, "validated?"=>nil, "closed?"=>true, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-0d4153cd-21b7-4f1a-a526-297314ddc61d-18", "locked_at"=>"2017-11-22T13:41:30.895Z", "closed_at"=>"2017-11-22T13:41:30.919Z", "project_session_id"=>1}]}