Return the exam specified by the :id parameter. Invisibles exams need at least the basic_staff role.

settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/exams/1
200
{
  "id": 1,
  "ip_range": "10.11.0.0/16,10.12.0.0/16,10.13.0.0/16",
  "begin_at": "2017-11-24T13:42:10.134Z",
  "end_at": "2017-11-24T15:42:10.134Z",
  "location": "Crona University",
  "max_people": 59,
  "nbr_subscribers": 0,
  "name": "Ordinary Wizarding Levels Exam",
  "campus": [
    {
      "id": 1,
      "name": "Cluj",
      "time_zone": "Europe/Bucharest",
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-22T13:40:59.468Z",
        "updated_at": "2017-11-22T13:41:26.139Z"
      },
      "users_count": 28,
      "vogsphere_id": 1
    }
  ],
  "cursus": [
    {
      "id": 1,
      "created_at": "2017-11-22T13:41:00.750Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  ],
  "projects": [
    {
      "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
    }
  ]
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/exams/1"

{
  "id": 1,
  "ip_range": "10.11.0.0/16,10.12.0.0/16,10.13.0.0/16",
  "begin_at": "2017-11-24T13:42:10.134Z",
  "end_at": "2017-11-24T15:42:10.134Z",
  "location": "Crona University",
  "max_people": 59,
  "nbr_subscribers": 0,
  "name": "Ordinary Wizarding Levels Exam",
  "campus": [
    {
      "id": 1,
      "name": "Cluj",
      "time_zone": "Europe/Bucharest",
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-22T13:40:59.468Z",
        "updated_at": "2017-11-22T13:41:26.139Z"
      },
      "users_count": 28,
      "vogsphere_id": 1
    }
  ],
  "cursus": [
    {
      "id": 1,
      "created_at": "2017-11-22T13:41:00.750Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  ],
  "projects": [
    {
      "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
    }
  ]
}
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/exams/1")
response.status
# => 200
response.parsed
# => {"id"=>1, "ip_range"=>"10.11.0.0/16,10.12.0.0/16,10.13.0.0/16", "begin_at"=>"2017-11-24T13:42:10.134Z", "end_at"=>"2017-11-24T15:42:10.134Z", "location"=>"Crona University", "max_people"=>59, "nbr_subscribers"=>0, "name"=>"Ordinary Wizarding Levels Exam", "campus"=>[{"id"=>1, "name"=>"Cluj", "time_zone"=>"Europe/Bucharest", "language"=>{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-11-22T13:40:59.468Z", "updated_at"=>"2017-11-22T13:41:26.139Z"}, "users_count"=>28, "vogsphere_id"=>1}], "cursus"=>[{"id"=>1, "created_at"=>"2017-11-22T13:41:00.750Z", "name"=>"Piscine C", "slug"=>"piscine-c"}], "projects"=>[{"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}]}