GET /v2/projects/:project_id/project_sessions
Return all the project sessions of the given Project
GET /v2/project_sessions
Return all the project sessions
live_help Notes
chrome_reader_mode
This resource is paginated by 30 items
settings Params
Param name | Description |
---|---|
project_id |
optional
. Must be String
The project id or slug |
sort |
optional
. Must be one of: id , project_id , campus_id , cursus_id , estimate_time , created_at , updated_at , begin_at , end_at , max_people , duration_days , terminating_after , solo , is_subscriptable , minimum_mark , team_behaviour , commit , difficulty , description , objectives , divisor .
The sort field. Sorted by id desc by default. MoreExample:To sort on project sessions on the fields objectives on a descending order and divisor on a ascending order: ...&sort=-objectives,divisor |
filter |
optional
. Must be one of: id , project_id , campus_id , cursus_id , estimate_time , created_at , updated_at , begin_at , end_at , max_people , duration_days , terminating_after , solo , is_subscriptable , team_behaviour , difficulty , future , end .
Filtering on one or more fields MoreExample:
To filter on project sessions with the
...&filter[id]=a_value,another_value Filterable fields:
|
range |
optional
. Must be one of: id , project_id , campus_id , cursus_id , estimate_time , created_at , updated_at , begin_at , end_at , max_people , duration_days , terminating_after , solo , is_subscriptable , team_behaviour , difficulty .
Select on a particular range MoreExample:
To range on project sessions with the
...&range[difficulty]=min_value,max_value Rangeable fields:
|
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 |
Examples
GET /v2/project_sessions
200
[
{
"id": 5,
"solo": false,
"begin_at": null,
"end_at": null,
"estimate_time": null,
"duration_days": null,
"terminating_after": null,
"project_id": 5,
"campus_id": null,
"cursus_id": null,
"created_at": "2017-11-22T13:41:26.911Z",
"updated_at": "2017-11-22T13:41:26.911Z",
"max_people": null,
"is_subscriptable": true,
"scales": [],
"uploads": [],
"team_behaviour": "user",
"project": {
"id": 5,
"name": "Quarter Finals",
"slug": "hogwarts-quidditch-cup-quarter-finals",
"description": null,
"parent": {
"name": "Hogwarts Quidditch Cup",
"id": 4,
"slug": "hogwarts-quidditch-cup",
"url": "https://projects.intra.42.fr/hogwarts-quidditch-cup/mine"
},
"children": [],
"objectives": null,
"tier": null,
"attachments": [],
"created_at": "2017-11-22T13:41:26.895Z",
"updated_at": "2017-11-22T13:41:26.973Z",
"exam": false
},
"campus": null,
"cursus": null,
"evaluations": [
{
"id": 5,
"kind": "scale"
}
]
},
{
"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-22T13:41:26.786Z",
"updated_at": "2017-11-22T13:41:26.786Z",
"max_people": null,
"is_subscriptable": true,
"scales": [],
"uploads": [],
"team_behaviour": "user",
"project": {
"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-22T13:41:26.765Z",
"updated_at": "2017-11-22T13:41:26.975Z",
"exam": false
},
"campus": null,
"cursus": null,
"evaluations": []
},
{
"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-11-22T13:41:26.545Z",
"updated_at": "2017-11-22T13:41:26.545Z",
"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-11-22T13:41:26.537Z",
"updated_at": "2017-11-22T13:41:26.616Z",
"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"
[
{
"id": 5,
"solo": false,
"begin_at": null,
"end_at": null,
"estimate_time": null,
"duration_days": null,
"terminating_after": null,
"project_id": 5,
"campus_id": null,
"cursus_id": null,
"created_at": "2017-11-22T13:41:26.911Z",
"updated_at": "2017-11-22T13:41:26.911Z",
"max_people": null,
"is_subscriptable": true,
"scales": [],
"uploads": [],
"team_behaviour": "user",
"project": {
"id": 5,
"name": "Quarter Finals",
"slug": "hogwarts-quidditch-cup-quarter-finals",
"description": null,
"parent": {
"name": "Hogwarts Quidditch Cup",
"id": 4,
"slug": "hogwarts-quidditch-cup",
"url": "https://projects.intra.42.fr/hogwarts-quidditch-cup/mine"
},
"children": [],
"objectives": null,
"tier": null,
"attachments": [],
"created_at": "2017-11-22T13:41:26.895Z",
"updated_at": "2017-11-22T13:41:26.973Z",
"exam": false
},
"campus": null,
"cursus": null,
"evaluations": [
{
"id": 5,
"kind": "scale"
}
]
},
{
"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-22T13:41:26.786Z",
"updated_at": "2017-11-22T13:41:26.786Z",
"max_people": null,
"is_subscriptable": true,
"scales": [],
"uploads": [],
"team_behaviour": "user",
"project": {
"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-22T13:41:26.765Z",
"updated_at": "2017-11-22T13:41:26.975Z",
"exam": false
},
"campus": null,
"cursus": null,
"evaluations": []
},
{
"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-11-22T13:41:26.545Z",
"updated_at": "2017-11-22T13:41:26.545Z",
"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-11-22T13:41:26.537Z",
"updated_at": "2017-11-22T13:41:26.616Z",
"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")
response.status
# => 200
response.parsed
# => [{"id"=>5, "solo"=>false, "begin_at"=>nil, "end_at"=>nil, "estimate_time"=>nil, "duration_days"=>nil, "terminating_after"=>nil, "project_id"=>5, "campus_id"=>nil, "cursus_id"=>nil, "created_at"=>"2017-11-22T13:41:26.911Z", "updated_at"=>"2017-11-22T13:41:26.911Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[], "uploads"=>[], "team_behaviour"=>"user", "project"=>{"id"=>5, "name"=>"Quarter Finals", "slug"=>"hogwarts-quidditch-cup-quarter-finals", "description"=>nil, "parent"=>{"name"=>"Hogwarts Quidditch Cup", "id"=>4, "slug"=>"hogwarts-quidditch-cup", "url"=>"https://projects.intra.42.fr/hogwarts-quidditch-cup/mine"}, "children"=>[], "objectives"=>nil, "tier"=>nil, "attachments"=>[], "created_at"=>"2017-11-22T13:41:26.895Z", "updated_at"=>"2017-11-22T13:41:26.973Z", "exam"=>false}, "campus"=>nil, "cursus"=>nil, "evaluations"=>[{"id"=>5, "kind"=>"scale"}]}, {"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-22T13:41:26.786Z", "updated_at"=>"2017-11-22T13:41:26.786Z", "max_people"=>nil, "is_subscriptable"=>true, "scales"=>[], "uploads"=>[], "team_behaviour"=>"user", "project"=>{"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-22T13:41:26.765Z", "updated_at"=>"2017-11-22T13:41:26.975Z", "exam"=>false}, "campus"=>nil, "cursus"=>nil, "evaluations"=>[]}, {"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-11-22T13:41:26.545Z", "updated_at"=>"2017-11-22T13:41:26.545Z", "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-11-22T13:41:26.537Z", "updated_at"=>"2017-11-22T13:41:26.616Z", "exam"=>true}, "campus"=>nil, "cursus"=>nil, "evaluations"=>[{"id"=>4, "kind"=>"scale"}]}]