settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/project_sessions/3
200
{
  "id": 3,
  "solo": true,
  "begin_at": null,
  "end_at": null,
  "estimate_time": 2592000,
  "duration_days": null,
  "terminating_after": null,
  "project_id": 3,
  "campus_id": null,
  "cursus_id": null,
  "created_at": "2017-03-06T14:59:04.649Z",
  "updated_at": "2017-03-06T14:59:04.649Z",
  "max_people": null,
  "is_subscriptable": true,
  "scales": [],
  "uploads": [],
  "team_behaviour": "user",
  "project": {
    "id": 3,
    "name": "Metaprogramming in OCaml",
    "slug": "metaprogramming-in-ocaml",
    "description": "Something you shouldn't see",
    "parent": null,
    "children": [],
    "objectives": [
      "Run away"
    ],
    "tier": 1,
    "attachments": [],
    "created_at": "2017-03-06T14:59:04.644Z",
    "updated_at": "2017-03-06T14:59:04.709Z",
    "exam": true
  },
  "campus": null,
  "cursus": null,
  "evaluations": [
    {
      "id": 4,
      "kind": "scale"
    }
  ]
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/project_sessions/3"

{
  "id": 3,
  "solo": true,
  "begin_at": null,
  "end_at": null,
  "estimate_time": 2592000,
  "duration_days": null,
  "terminating_after": null,
  "project_id": 3,
  "campus_id": null,
  "cursus_id": null,
  "created_at": "2017-03-06T14:59:04.649Z",
  "updated_at": "2017-03-06T14:59:04.649Z",
  "max_people": null,
  "is_subscriptable": true,
  "scales": [],
  "uploads": [],
  "team_behaviour": "user",
  "project": {
    "id": 3,
    "name": "Metaprogramming in OCaml",
    "slug": "metaprogramming-in-ocaml",
    "description": "Something you shouldn't see",
    "parent": null,
    "children": [],
    "objectives": [
      "Run away"
    ],
    "tier": 1,
    "attachments": [],
    "created_at": "2017-03-06T14:59:04.644Z",
    "updated_at": "2017-03-06T14:59:04.709Z",
    "exam": true
  },
  "campus": null,
  "cursus": null,
  "evaluations": [
    {
      "id": 4,
      "kind": "scale"
    }
  ]
}
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/project_sessions/3")
response.status
# => 200
response.parsed
# => {"id"=>3, "solo"=>true, "begin_at"=>nil, "end_at"=>nil, "estimate_time"=>2592000, "duration_days"=>nil, "terminating_after"=>nil, "project_id"=>3, "campus_id"=>nil, "cursus_id"=>nil, "created_at"=>"2017-03-06T14:59:04.649Z", "updated_at"=>"2017-03-06T14:59:04.649Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[], "uploads"=>[], "team_behaviour"=>"user", "project"=>{"id"=>3, "name"=>"Metaprogramming in OCaml", "slug"=>"metaprogramming-in-ocaml", "description"=>"Something you shouldn't see", "parent"=>nil, "children"=>[], "objectives"=>["Run away"], "tier"=>1, "attachments"=>[], "created_at"=>"2017-03-06T14:59:04.644Z", "updated_at"=>"2017-03-06T14:59:04.709Z", "exam"=>true}, "campus"=>nil, "cursus"=>nil, "evaluations"=>[{"id"=>4, "kind"=>"scale"}]}