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/2
200
{
  "id": 2,
  "solo": true,
  "begin_at": null,
  "end_at": null,
  "estimate_time": 2592000,
  "duration_days": null,
  "terminating_after": null,
  "project_id": 2,
  "campus_id": null,
  "cursus_id": null,
  "created_at": "2017-11-22T13:41:26.375Z",
  "updated_at": "2017-11-22T13:41:28.347Z",
  "max_people": null,
  "is_subscriptable": true,
  "scales": [
    {
      "id": 2,
      "correction_number": 3,
      "is_primary": true
    }
  ],
  "uploads": [],
  "team_behaviour": "user",
  "project": {
    "id": 2,
    "name": "Ordinary Wizarding Levels",
    "slug": "ordinary-wizarding-levels",
    "description": "Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.",
    "parent": null,
    "children": [],
    "objectives": [
      "Wizarding"
    ],
    "tier": 1,
    "attachments": [],
    "created_at": "2017-11-22T13:41:26.356Z",
    "updated_at": "2017-11-22T13:41:26.441Z",
    "exam": true
  },
  "campus": null,
  "cursus": null,
  "evaluations": [
    {
      "id": 3,
      "kind": "scale"
    }
  ]
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/project_sessions/2"

{
  "id": 2,
  "solo": true,
  "begin_at": null,
  "end_at": null,
  "estimate_time": 2592000,
  "duration_days": null,
  "terminating_after": null,
  "project_id": 2,
  "campus_id": null,
  "cursus_id": null,
  "created_at": "2017-11-22T13:41:26.375Z",
  "updated_at": "2017-11-22T13:41:28.347Z",
  "max_people": null,
  "is_subscriptable": true,
  "scales": [
    {
      "id": 2,
      "correction_number": 3,
      "is_primary": true
    }
  ],
  "uploads": [],
  "team_behaviour": "user",
  "project": {
    "id": 2,
    "name": "Ordinary Wizarding Levels",
    "slug": "ordinary-wizarding-levels",
    "description": "Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.",
    "parent": null,
    "children": [],
    "objectives": [
      "Wizarding"
    ],
    "tier": 1,
    "attachments": [],
    "created_at": "2017-11-22T13:41:26.356Z",
    "updated_at": "2017-11-22T13:41:26.441Z",
    "exam": true
  },
  "campus": null,
  "cursus": null,
  "evaluations": [
    {
      "id": 3,
      "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/2")
response.status
# => 200
response.parsed
# => {"id"=>2, "solo"=>true, "begin_at"=>nil, "end_at"=>nil, "estimate_time"=>2592000, "duration_days"=>nil, "terminating_after"=>nil, "project_id"=>2, "campus_id"=>nil, "cursus_id"=>nil, "created_at"=>"2017-11-22T13:41:26.375Z", "updated_at"=>"2017-11-22T13:41:28.347Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[{"id"=>2, "correction_number"=>3, "is_primary"=>true}], "uploads"=>[], "team_behaviour"=>"user", "project"=>{"id"=>2, "name"=>"Ordinary Wizarding Levels", "slug"=>"ordinary-wizarding-levels", "description"=>"Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.", "parent"=>nil, "children"=>[], "objectives"=>["Wizarding"], "tier"=>1, "attachments"=>[], "created_at"=>"2017-11-22T13:41:26.356Z", "updated_at"=>"2017-11-22T13:41:26.441Z", "exam"=>true}, "campus"=>nil, "cursus"=>nil, "evaluations"=>[{"id"=>3, "kind"=>"scale"}]}