live_help Notes

chrome_reader_mode This resource is paginated by 30 items

settings Params

Param name Description
cursus_id optional . Must be String

The cursus id or slug

project_id optional . Must be String

The project id or slug

sort optional . Must be one of: id, name, created_at, updated_at, difficulty, visible, exam, parent_id, slug, inherited_team, position, has_git, has_mark, description, objectives.

The sort field. Sorted by position asc by default.

Example:

To sort on projects on the fields description on a descending order and objectives on a ascending order:

...&sort=-description,objectives

filter optional . Must be one of: id, name, created_at, updated_at, visible, exam, parent_id, slug, inherited_team, position, has_git, has_mark, description, tier.

Filtering on one or more fields

Example:

To filter on projects with the id field matching a_value or another_value:

...&filter[id]=a_value,another_value

Filterable fields:
  • id (standard field)
  • name (standard field)
  • created_at (standard field)
  • updated_at (standard field)
  • visible (standard field)
  • exam (standard field)
  • parent_id (standard field)
  • slug (standard field)
  • inherited_team (standard field)
  • position (standard field)
  • has_git (standard field)
  • has_mark (standard field)
  • description (standard field)
  • tier : Filter on a project's tier. Can be one of: 0, 1, 2, 3, 4, 5
range optional . Must be one of: id, name, created_at, updated_at, parent_id, slug, position, description.

Select on a particular range

Example:

To range on projects with the description field between min_value and max_value:

...&range[description]=min_value,max_value

Rangeable fields:
  • id
  • name
  • created_at
  • updated_at
  • parent_id
  • slug
  • position
  • description
page optional . Must be a Hash

The pagination params, as a hash

page[number] optional . Must be Fixnum

The current page

page[size] optional . Must be Fixnum

The number of items per page, defaults to 30, maximum 100

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/cursus/1/projects
200
[
  {
    "id": 1,
    "name": "Libft",
    "slug": "libft",
    "description": "The first project of 42 !",
    "parent": null,
    "children": [],
    "objectives": [
      "initiation"
    ],
    "tier": 1,
    "attachments": [],
    "created_at": "2017-03-06T14:59:04.053Z",
    "updated_at": "2017-03-06T14:59:04.412Z",
    "exam": false,
    "cursus": [
      {
        "id": 1,
        "created_at": "2017-03-06T14:58:43.965Z",
        "name": "Piscine C",
        "slug": "piscine-c"
      }
    ],
    "campus": [
      {
        "id": 1,
        "name": "Cluj",
        "time_zone": "Bucharest",
        "language": {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-03-06T14:58:43.176Z",
          "updated_at": "2017-03-06T14:58:43.176Z"
        },
        "users_count": 16,
        "vogsphere_id": 1
      }
    ],
    "skills": [
      {
        "id": 4,
        "name": "Shell",
        "created_at": "2017-03-06T14:58:43.788Z"
      },
      {
        "id": 2,
        "name": "Company experience",
        "created_at": "2017-03-06T14:58:43.774Z"
      }
    ],
    "videos": [],
    "tags": [
      {
        "id": 12,
        "name": "Libft",
        "kind": "general"
      }
    ],
    "project_sessions": [
      {
        "id": 1,
        "solo": true,
        "begin_at": null,
        "end_at": null,
        "estimate_time": 2592000,
        "duration_days": null,
        "terminating_after": null,
        "project_id": 1,
        "campus_id": null,
        "cursus_id": null,
        "created_at": "2017-03-06T14:59:04.337Z",
        "updated_at": "2017-03-06T14:59:34.937Z",
        "max_people": null,
        "is_subscriptable": true,
        "scales": [
          {
            "id": 1,
            "correction_number": 3,
            "is_primary": true
          }
        ],
        "uploads": [
          {
            "id": 1,
            "name": "Arkansas buffalo"
          }
        ],
        "team_behaviour": "user"
      }
    ]
  },
  {
    "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-03-06T14:59:04.501Z",
    "updated_at": "2017-03-06T14:59:04.573Z",
    "exam": true,
    "cursus": [
      {
        "id": 1,
        "created_at": "2017-03-06T14:58:43.965Z",
        "name": "Piscine C",
        "slug": "piscine-c"
      }
    ],
    "campus": [
      {
        "id": 1,
        "name": "Cluj",
        "time_zone": "Bucharest",
        "language": {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-03-06T14:58:43.176Z",
          "updated_at": "2017-03-06T14:58:43.176Z"
        },
        "users_count": 16,
        "vogsphere_id": 1
      }
    ],
    "skills": [
      {
        "id": 2,
        "name": "Company experience",
        "created_at": "2017-03-06T14:58:43.774Z"
      },
      {
        "id": 6,
        "name": "Basics",
        "created_at": "2017-03-06T14:58:43.800Z"
      }
    ],
    "videos": [],
    "tags": [
      {
        "id": 13,
        "name": "Ordinary Wizarding Levels",
        "kind": "general"
      }
    ],
    "project_sessions": [
      {
        "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-03-06T14:59:04.515Z",
        "updated_at": "2017-03-06T14:59:06.202Z",
        "max_people": null,
        "is_subscriptable": true,
        "scales": [
          {
            "id": 2,
            "correction_number": 3,
            "is_primary": true
          }
        ],
        "uploads": [],
        "team_behaviour": "user"
      }
    ]
  },
  {
    "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-03-06T14:59:04.871Z",
    "updated_at": "2017-03-06T14:59:05.083Z",
    "exam": false,
    "cursus": [
      {
        "id": 1,
        "created_at": "2017-03-06T14:58:43.965Z",
        "name": "Piscine C",
        "slug": "piscine-c"
      }
    ],
    "campus": [
      {
        "id": 1,
        "name": "Cluj",
        "time_zone": "Bucharest",
        "language": {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-03-06T14:58:43.176Z",
          "updated_at": "2017-03-06T14:58:43.176Z"
        },
        "users_count": 16,
        "vogsphere_id": 1
      }
    ],
    "skills": [
      {
        "id": 2,
        "name": "Company experience",
        "created_at": "2017-03-06T14:58:43.774Z"
      },
      {
        "id": 4,
        "name": "Shell",
        "created_at": "2017-03-06T14:58:43.788Z"
      }
    ],
    "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-03-06T14:59:04.885Z",
        "updated_at": "2017-03-06T14:59:04.885Z",
        "max_people": null,
        "is_subscriptable": true,
        "scales": [],
        "uploads": [],
        "team_behaviour": "user"
      }
    ]
  }
]
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/cursus/1/projects"

[
  {
    "id": 1,
    "name": "Libft",
    "slug": "libft",
    "description": "The first project of 42 !",
    "parent": null,
    "children": [],
    "objectives": [
      "initiation"
    ],
    "tier": 1,
    "attachments": [],
    "created_at": "2017-03-06T14:59:04.053Z",
    "updated_at": "2017-03-06T14:59:04.412Z",
    "exam": false,
    "cursus": [
      {
        "id": 1,
        "created_at": "2017-03-06T14:58:43.965Z",
        "name": "Piscine C",
        "slug": "piscine-c"
      }
    ],
    "campus": [
      {
        "id": 1,
        "name": "Cluj",
        "time_zone": "Bucharest",
        "language": {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-03-06T14:58:43.176Z",
          "updated_at": "2017-03-06T14:58:43.176Z"
        },
        "users_count": 16,
        "vogsphere_id": 1
      }
    ],
    "skills": [
      {
        "id": 4,
        "name": "Shell",
        "created_at": "2017-03-06T14:58:43.788Z"
      },
      {
        "id": 2,
        "name": "Company experience",
        "created_at": "2017-03-06T14:58:43.774Z"
      }
    ],
    "videos": [],
    "tags": [
      {
        "id": 12,
        "name": "Libft",
        "kind": "general"
      }
    ],
    "project_sessions": [
      {
        "id": 1,
        "solo": true,
        "begin_at": null,
        "end_at": null,
        "estimate_time": 2592000,
        "duration_days": null,
        "terminating_after": null,
        "project_id": 1,
        "campus_id": null,
        "cursus_id": null,
        "created_at": "2017-03-06T14:59:04.337Z",
        "updated_at": "2017-03-06T14:59:34.937Z",
        "max_people": null,
        "is_subscriptable": true,
        "scales": [
          {
            "id": 1,
            "correction_number": 3,
            "is_primary": true
          }
        ],
        "uploads": [
          {
            "id": 1,
            "name": "Arkansas buffalo"
          }
        ],
        "team_behaviour": "user"
      }
    ]
  },
  {
    "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-03-06T14:59:04.501Z",
    "updated_at": "2017-03-06T14:59:04.573Z",
    "exam": true,
    "cursus": [
      {
        "id": 1,
        "created_at": "2017-03-06T14:58:43.965Z",
        "name": "Piscine C",
        "slug": "piscine-c"
      }
    ],
    "campus": [
      {
        "id": 1,
        "name": "Cluj",
        "time_zone": "Bucharest",
        "language": {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-03-06T14:58:43.176Z",
          "updated_at": "2017-03-06T14:58:43.176Z"
        },
        "users_count": 16,
        "vogsphere_id": 1
      }
    ],
    "skills": [
      {
        "id": 2,
        "name": "Company experience",
        "created_at": "2017-03-06T14:58:43.774Z"
      },
      {
        "id": 6,
        "name": "Basics",
        "created_at": "2017-03-06T14:58:43.800Z"
      }
    ],
    "videos": [],
    "tags": [
      {
        "id": 13,
        "name": "Ordinary Wizarding Levels",
        "kind": "general"
      }
    ],
    "project_sessions": [
      {
        "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-03-06T14:59:04.515Z",
        "updated_at": "2017-03-06T14:59:06.202Z",
        "max_people": null,
        "is_subscriptable": true,
        "scales": [
          {
            "id": 2,
            "correction_number": 3,
            "is_primary": true
          }
        ],
        "uploads": [],
        "team_behaviour": "user"
      }
    ]
  },
  {
    "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-03-06T14:59:04.871Z",
    "updated_at": "2017-03-06T14:59:05.083Z",
    "exam": false,
    "cursus": [
      {
        "id": 1,
        "created_at": "2017-03-06T14:58:43.965Z",
        "name": "Piscine C",
        "slug": "piscine-c"
      }
    ],
    "campus": [
      {
        "id": 1,
        "name": "Cluj",
        "time_zone": "Bucharest",
        "language": {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-03-06T14:58:43.176Z",
          "updated_at": "2017-03-06T14:58:43.176Z"
        },
        "users_count": 16,
        "vogsphere_id": 1
      }
    ],
    "skills": [
      {
        "id": 2,
        "name": "Company experience",
        "created_at": "2017-03-06T14:58:43.774Z"
      },
      {
        "id": 4,
        "name": "Shell",
        "created_at": "2017-03-06T14:58:43.788Z"
      }
    ],
    "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-03-06T14:59:04.885Z",
        "updated_at": "2017-03-06T14:59:04.885Z",
        "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/cursus/1/projects")
response.status
# => 200
response.parsed
# => [{"id"=>1, "name"=>"Libft", "slug"=>"libft", "description"=>"The first project of 42 !", "parent"=>nil, "children"=>[], "objectives"=>["initiation"], "tier"=>1, "attachments"=>[], "created_at"=>"2017-03-06T14:59:04.053Z", "updated_at"=>"2017-03-06T14:59:04.412Z", "exam"=>false, "cursus"=>[{"id"=>1, "created_at"=>"2017-03-06T14:58:43.965Z", "name"=>"Piscine C", "slug"=>"piscine-c"}], "campus"=>[{"id"=>1, "name"=>"Cluj", "time_zone"=>"Bucharest", "language"=>{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-03-06T14:58:43.176Z", "updated_at"=>"2017-03-06T14:58:43.176Z"}, "users_count"=>16, "vogsphere_id"=>1}], "skills"=>[{"id"=>4, "name"=>"Shell", "created_at"=>"2017-03-06T14:58:43.788Z"}, {"id"=>2, "name"=>"Company experience", "created_at"=>"2017-03-06T14:58:43.774Z"}], "videos"=>[], "tags"=>[{"id"=>12, "name"=>"Libft", "kind"=>"general"}], "project_sessions"=>[{"id"=>1, "solo"=>true, "begin_at"=>nil, "end_at"=>nil, "estimate_time"=>2592000, "duration_days"=>nil, "terminating_after"=>nil, "project_id"=>1, "campus_id"=>nil, "cursus_id"=>nil, "created_at"=>"2017-03-06T14:59:04.337Z", "updated_at"=>"2017-03-06T14:59:34.937Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[{"id"=>1, "correction_number"=>3, "is_primary"=>true}], "uploads"=>[{"id"=>1, "name"=>"Arkansas buffalo"}], "team_behaviour"=>"user"}]}, {"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-03-06T14:59:04.501Z", "updated_at"=>"2017-03-06T14:59:04.573Z", "exam"=>true, "cursus"=>[{"id"=>1, "created_at"=>"2017-03-06T14:58:43.965Z", "name"=>"Piscine C", "slug"=>"piscine-c"}], "campus"=>[{"id"=>1, "name"=>"Cluj", "time_zone"=>"Bucharest", "language"=>{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-03-06T14:58:43.176Z", "updated_at"=>"2017-03-06T14:58:43.176Z"}, "users_count"=>16, "vogsphere_id"=>1}], "skills"=>[{"id"=>2, "name"=>"Company experience", "created_at"=>"2017-03-06T14:58:43.774Z"}, {"id"=>6, "name"=>"Basics", "created_at"=>"2017-03-06T14:58:43.800Z"}], "videos"=>[], "tags"=>[{"id"=>13, "name"=>"Ordinary Wizarding Levels", "kind"=>"general"}], "project_sessions"=>[{"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-03-06T14:59:04.515Z", "updated_at"=>"2017-03-06T14:59:06.202Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[{"id"=>2, "correction_number"=>3, "is_primary"=>true}], "uploads"=>[], "team_behaviour"=>"user"}]}, {"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-03-06T14:59:04.871Z", "updated_at"=>"2017-03-06T14:59:05.083Z", "exam"=>false, "cursus"=>[{"id"=>1, "created_at"=>"2017-03-06T14:58:43.965Z", "name"=>"Piscine C", "slug"=>"piscine-c"}], "campus"=>[{"id"=>1, "name"=>"Cluj", "time_zone"=>"Bucharest", "language"=>{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-03-06T14:58:43.176Z", "updated_at"=>"2017-03-06T14:58:43.176Z"}, "users_count"=>16, "vogsphere_id"=>1}], "skills"=>[{"id"=>2, "name"=>"Company experience", "created_at"=>"2017-03-06T14:58:43.774Z"}, {"id"=>4, "name"=>"Shell", "created_at"=>"2017-03-06T14:58:43.788Z"}], "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-03-06T14:59:04.885Z", "updated_at"=>"2017-03-06T14:59:04.885Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[], "uploads"=>[], "team_behaviour"=>"user"}]}]