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/4
200
{
  "id": 4,
  "name": "Hogwarts Quidditch Cup",
  "slug": "hogwarts-quidditch-cup",
  "description": "The game starts with the referee releasing all four balls from the central circle. The Bludgers and the Snitch, having been bewitched, fly off of their own accord, the Snitch to hide itself quickly and the Bludgers to attack the nearest players. The Quaffle is thrown into the air by the referee to signal the start of play.",
  "parent": null,
  "children": [
    {
      "name": "Quarter Finals",
      "id": 5,
      "slug": "hogwarts-quidditch-cup-quarter-finals",
      "url": "https://projects.intra.42.fr/hogwarts-quidditch-cup-quarter-finals/mine"
    }
  ],
  "objectives": [
    "Quidditch"
  ],
  "tier": 1,
  "attachments": [],
  "created_at": "2017-11-21T17:09:14.242Z",
  "updated_at": "2017-11-21T17:09:14.534Z",
  "exam": false,
  "cursus": [
    {
      "id": 1,
      "created_at": "2017-11-21T17:08:46.956Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  ],
  "campus": [
    {
      "id": 1,
      "name": "Cluj",
      "time_zone": "Europe/Bucharest",
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-21T17:08:45.857Z",
        "updated_at": "2017-11-21T17:08:45.857Z"
      },
      "users_count": 32,
      "vogsphere_id": 1
    }
  ],
  "skills": [
    {
      "id": 6,
      "name": "Basics",
      "created_at": "2017-11-21T17:08:46.669Z"
    },
    {
      "id": 10,
      "name": "Technology integration",
      "created_at": "2017-11-21T17:08:46.806Z"
    }
  ],
  "videos": [],
  "tags": [
    {
      "id": 15,
      "name": "Hogwarts Quidditch Cup",
      "kind": "general"
    }
  ],
  "project_sessions": [
    {
      "id": 4,
      "solo": false,
      "begin_at": null,
      "end_at": null,
      "estimate_time": null,
      "duration_days": null,
      "terminating_after": null,
      "project_id": 4,
      "campus_id": null,
      "cursus_id": null,
      "created_at": "2017-11-21T17:09:14.265Z",
      "updated_at": "2017-11-21T17:09:14.265Z",
      "max_people": null,
      "is_subscriptable": true,
      "scales": [],
      "uploads": [],
      "team_behaviour": "user"
    }
  ]
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/projects/4"

{
  "id": 4,
  "name": "Hogwarts Quidditch Cup",
  "slug": "hogwarts-quidditch-cup",
  "description": "The game starts with the referee releasing all four balls from the central circle. The Bludgers and the Snitch, having been bewitched, fly off of their own accord, the Snitch to hide itself quickly and the Bludgers to attack the nearest players. The Quaffle is thrown into the air by the referee to signal the start of play.",
  "parent": null,
  "children": [
    {
      "name": "Quarter Finals",
      "id": 5,
      "slug": "hogwarts-quidditch-cup-quarter-finals",
      "url": "https://projects.intra.42.fr/hogwarts-quidditch-cup-quarter-finals/mine"
    }
  ],
  "objectives": [
    "Quidditch"
  ],
  "tier": 1,
  "attachments": [],
  "created_at": "2017-11-21T17:09:14.242Z",
  "updated_at": "2017-11-21T17:09:14.534Z",
  "exam": false,
  "cursus": [
    {
      "id": 1,
      "created_at": "2017-11-21T17:08:46.956Z",
      "name": "Piscine C",
      "slug": "piscine-c"
    }
  ],
  "campus": [
    {
      "id": 1,
      "name": "Cluj",
      "time_zone": "Europe/Bucharest",
      "language": {
        "id": 3,
        "name": "Romanian",
        "identifier": "ro",
        "created_at": "2017-11-21T17:08:45.857Z",
        "updated_at": "2017-11-21T17:08:45.857Z"
      },
      "users_count": 32,
      "vogsphere_id": 1
    }
  ],
  "skills": [
    {
      "id": 6,
      "name": "Basics",
      "created_at": "2017-11-21T17:08:46.669Z"
    },
    {
      "id": 10,
      "name": "Technology integration",
      "created_at": "2017-11-21T17:08:46.806Z"
    }
  ],
  "videos": [],
  "tags": [
    {
      "id": 15,
      "name": "Hogwarts Quidditch Cup",
      "kind": "general"
    }
  ],
  "project_sessions": [
    {
      "id": 4,
      "solo": false,
      "begin_at": null,
      "end_at": null,
      "estimate_time": null,
      "duration_days": null,
      "terminating_after": null,
      "project_id": 4,
      "campus_id": null,
      "cursus_id": null,
      "created_at": "2017-11-21T17:09:14.265Z",
      "updated_at": "2017-11-21T17:09:14.265Z",
      "max_people": null,
      "is_subscriptable": true,
      "scales": [],
      "uploads": [],
      "team_behaviour": "user"
    }
  ]
}
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/4")
response.status
# => 200
response.parsed
# => {"id"=>4, "name"=>"Hogwarts Quidditch Cup", "slug"=>"hogwarts-quidditch-cup", "description"=>"The game starts with the referee releasing all four balls from the central circle. The Bludgers and the Snitch, having been bewitched, fly off of their own accord, the Snitch to hide itself quickly and the Bludgers to attack the nearest players. The Quaffle is thrown into the air by the referee to signal the start of play.", "parent"=>nil, "children"=>[{"name"=>"Quarter Finals", "id"=>5, "slug"=>"hogwarts-quidditch-cup-quarter-finals", "url"=>"https://projects.intra.42.fr/hogwarts-quidditch-cup-quarter-finals/mine"}], "objectives"=>["Quidditch"], "tier"=>1, "attachments"=>[], "created_at"=>"2017-11-21T17:09:14.242Z", "updated_at"=>"2017-11-21T17:09:14.534Z", "exam"=>false, "cursus"=>[{"id"=>1, "created_at"=>"2017-11-21T17:08:46.956Z", "name"=>"Piscine C", "slug"=>"piscine-c"}], "campus"=>[{"id"=>1, "name"=>"Cluj", "time_zone"=>"Europe/Bucharest", "language"=>{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-11-21T17:08:45.857Z", "updated_at"=>"2017-11-21T17:08:45.857Z"}, "users_count"=>32, "vogsphere_id"=>1}], "skills"=>[{"id"=>6, "name"=>"Basics", "created_at"=>"2017-11-21T17:08:46.669Z"}, {"id"=>10, "name"=>"Technology integration", "created_at"=>"2017-11-21T17:08:46.806Z"}], "videos"=>[], "tags"=>[{"id"=>15, "name"=>"Hogwarts Quidditch Cup", "kind"=>"general"}], "project_sessions"=>[{"id"=>4, "solo"=>false, "begin_at"=>nil, "end_at"=>nil, "estimate_time"=>nil, "duration_days"=>nil, "terminating_after"=>nil, "project_id"=>4, "campus_id"=>nil, "cursus_id"=>nil, "created_at"=>"2017-11-21T17:09:14.265Z", "updated_at"=>"2017-11-21T17:09:14.265Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[], "uploads"=>[], "team_behaviour"=>"user"}]}