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/9
200
{
  "id": 9,
  "occurrence": 0,
  "final_mark": null,
  "status": "waiting_for_correction",
  "validated?": null,
  "current_team_id": 9,
  "project": {
    "id": 1,
    "name": "Libft",
    "slug": "libft",
    "parent_id": null
  },
  "cursus_ids": [
    1
  ],
  "user": {
    "id": 12,
    "login": "rhaako",
    "url": "https://api.intra.42.fr/v2/users/rhaako"
  },
  "teams": [
    {
      "id": 9,
      "name": "rhaako's group",
      "url": "https://api.intra.42.fr/v2/teams/9",
      "final_mark": null,
      "project_id": 1,
      "created_at": "2017-03-06T14:59:07.344Z",
      "updated_at": "2017-03-06T14:59:07.452Z",
      "status": "waiting_for_correction",
      "terminating_at": null,
      "users": [
        {
          "id": 12,
          "login": "cdooku",
          "url": "https://api.intra.42.fr/v2/users/cdooku",
          "leader": true,
          "occurrence": 0,
          "validated": true,
          "projects_user_id": 9
        }
      ],
      "locked?": true,
      "validated?": null,
      "closed?": true,
      "repo_url": null,
      "repo_uuid": "intra-uuid-528f69f1-693e-41f8-81da-a532739c8e56-9",
      "locked_at": "2017-03-06T14:59:07.422Z",
      "closed_at": "2017-03-06T14:59:07.451Z",
      "project_session_id": 1
    }
  ]
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/projects_users/9"

{
  "id": 9,
  "occurrence": 0,
  "final_mark": null,
  "status": "waiting_for_correction",
  "validated?": null,
  "current_team_id": 9,
  "project": {
    "id": 1,
    "name": "Libft",
    "slug": "libft",
    "parent_id": null
  },
  "cursus_ids": [
    1
  ],
  "user": {
    "id": 12,
    "login": "rhaako",
    "url": "https://api.intra.42.fr/v2/users/rhaako"
  },
  "teams": [
    {
      "id": 9,
      "name": "rhaako's group",
      "url": "https://api.intra.42.fr/v2/teams/9",
      "final_mark": null,
      "project_id": 1,
      "created_at": "2017-03-06T14:59:07.344Z",
      "updated_at": "2017-03-06T14:59:07.452Z",
      "status": "waiting_for_correction",
      "terminating_at": null,
      "users": [
        {
          "id": 12,
          "login": "cdooku",
          "url": "https://api.intra.42.fr/v2/users/cdooku",
          "leader": true,
          "occurrence": 0,
          "validated": true,
          "projects_user_id": 9
        }
      ],
      "locked?": true,
      "validated?": null,
      "closed?": true,
      "repo_url": null,
      "repo_uuid": "intra-uuid-528f69f1-693e-41f8-81da-a532739c8e56-9",
      "locked_at": "2017-03-06T14:59:07.422Z",
      "closed_at": "2017-03-06T14:59:07.451Z",
      "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/9")
response.status
# => 200
response.parsed
# => {"id"=>9, "occurrence"=>0, "final_mark"=>nil, "status"=>"waiting_for_correction", "validated?"=>nil, "current_team_id"=>9, "project"=>{"id"=>1, "name"=>"Libft", "slug"=>"libft", "parent_id"=>nil}, "cursus_ids"=>[1], "user"=>{"id"=>12, "login"=>"rhaako", "url"=>"https://api.intra.42.fr/v2/users/rhaako"}, "teams"=>[{"id"=>9, "name"=>"rhaako's group", "url"=>"https://api.intra.42.fr/v2/teams/9", "final_mark"=>nil, "project_id"=>1, "created_at"=>"2017-03-06T14:59:07.344Z", "updated_at"=>"2017-03-06T14:59:07.452Z", "status"=>"waiting_for_correction", "terminating_at"=>nil, "users"=>[{"id"=>12, "login"=>"cdooku", "url"=>"https://api.intra.42.fr/v2/users/cdooku", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>9}], "locked?"=>true, "validated?"=>nil, "closed?"=>true, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-528f69f1-693e-41f8-81da-a532739c8e56-9", "locked_at"=>"2017-03-06T14:59:07.422Z", "closed_at"=>"2017-03-06T14:59:07.451Z", "project_session_id"=>1}]}