GET /v2/projects/:project_id/projects_users
Return all the projects users of the given Project
GET /v2/users/:user_id/projects_users
Return all the projects users of the given User
GET /v2/projects_users
Return all the projects users
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 |
user_id |
optional
. Must be String
The user id or slug |
filter |
optional
. Must be one of: id , project_id , user_id , created_at , updated_at , occurrence , final_mark , retriable_at , marked_at , status , cursus , campus , retriable , marked .
Filtering on one or more fields MoreExample:
To filter on projects users with the
...&filter[id]=a_value,another_value Filterable fields:
|
range |
optional
. Must be one of: id , project_id , user_id , created_at , updated_at , occurrence , final_mark , retriable_at , marked_at , status .
Select on a particular range MoreExample:
To range on projects users with the
...&range[status]=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/projects_users
200
[
{
"id": 1,
"occurrence": 0,
"final_mark": null,
"status": "in_progress",
"validated?": null,
"current_team_id": 1,
"project": {
"id": 2,
"name": "Ordinary Wizarding Levels",
"slug": "ordinary-wizarding-levels",
"parent_id": null
},
"cursus_ids": [
1
],
"user": {
"id": 111,
"login": "jabinks2",
"url": "https://api.intra.42.fr/v2/users/jabinks2"
},
"teams": [
{
"id": 1,
"name": "jabinks2's group",
"url": "https://api.intra.42.fr/v2/teams/1",
"final_mark": null,
"project_id": 2,
"created_at": "2017-11-22T13:41:28.447Z",
"updated_at": "2017-11-22T13:41:28.519Z",
"status": "in_progress",
"terminating_at": null,
"users": [
{
"id": 111,
"login": "coundook",
"url": "https://api.intra.42.fr/v2/users/coundook",
"leader": true,
"occurrence": 0,
"validated": true,
"projects_user_id": 1
}
],
"locked?": true,
"validated?": null,
"closed?": false,
"repo_url": null,
"repo_uuid": "intra-uuid-e8f23ddc-8e52-47a8-87e9-9bd490621cfd-1",
"locked_at": "2017-11-22T13:41:28.487Z",
"closed_at": null,
"project_session_id": 2
}
]
},
{
"id": 2,
"occurrence": 0,
"final_mark": null,
"status": "in_progress",
"validated?": null,
"current_team_id": 2,
"project": {
"id": 4,
"name": "Hogwarts Quidditch Cup",
"slug": "hogwarts-quidditch-cup",
"parent_id": null
},
"cursus_ids": [
1
],
"user": {
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2"
},
"teams": [
{
"id": 2,
"name": "podamer2's group",
"url": "https://api.intra.42.fr/v2/teams/2",
"final_mark": null,
"project_id": 4,
"created_at": "2017-11-22T13:41:28.554Z",
"updated_at": "2017-11-22T13:41:28.608Z",
"status": "in_progress",
"terminating_at": null,
"users": [
{
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2",
"leader": true,
"occurrence": 0,
"validated": true,
"projects_user_id": 2
}
],
"locked?": false,
"validated?": null,
"closed?": true,
"repo_url": null,
"repo_uuid": "intra-uuid-ae9bdbbc-9c16-4c27-8f18-eccee5a31020-2",
"locked_at": null,
"closed_at": "2017-11-22T13:41:28.578Z",
"project_session_id": 4
}
]
},
{
"id": 3,
"occurrence": 0,
"final_mark": null,
"status": "creating_group",
"validated?": null,
"current_team_id": 3,
"project": {
"id": 5,
"name": "Quarter Finals",
"slug": "hogwarts-quidditch-cup-quarter-finals",
"parent_id": 4
},
"cursus_ids": [
1
],
"user": {
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2"
},
"teams": [
{
"id": 3,
"name": "podamer2's group",
"url": "https://api.intra.42.fr/v2/teams/3",
"final_mark": null,
"project_id": 5,
"created_at": "2017-11-22T13:41:28.661Z",
"updated_at": "2017-11-22T13:41:28.704Z",
"status": "creating_group",
"terminating_at": null,
"users": [
{
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2",
"leader": true,
"occurrence": 0,
"validated": true,
"projects_user_id": 3
}
],
"locked?": false,
"validated?": null,
"closed?": false,
"repo_url": null,
"repo_uuid": "intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3",
"locked_at": null,
"closed_at": null,
"project_session_id": 5
}
]
}
]
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/projects_users"
[
{
"id": 1,
"occurrence": 0,
"final_mark": null,
"status": "in_progress",
"validated?": null,
"current_team_id": 1,
"project": {
"id": 2,
"name": "Ordinary Wizarding Levels",
"slug": "ordinary-wizarding-levels",
"parent_id": null
},
"cursus_ids": [
1
],
"user": {
"id": 111,
"login": "jabinks2",
"url": "https://api.intra.42.fr/v2/users/jabinks2"
},
"teams": [
{
"id": 1,
"name": "jabinks2's group",
"url": "https://api.intra.42.fr/v2/teams/1",
"final_mark": null,
"project_id": 2,
"created_at": "2017-11-22T13:41:28.447Z",
"updated_at": "2017-11-22T13:41:28.519Z",
"status": "in_progress",
"terminating_at": null,
"users": [
{
"id": 111,
"login": "coundook",
"url": "https://api.intra.42.fr/v2/users/coundook",
"leader": true,
"occurrence": 0,
"validated": true,
"projects_user_id": 1
}
],
"locked?": true,
"validated?": null,
"closed?": false,
"repo_url": null,
"repo_uuid": "intra-uuid-e8f23ddc-8e52-47a8-87e9-9bd490621cfd-1",
"locked_at": "2017-11-22T13:41:28.487Z",
"closed_at": null,
"project_session_id": 2
}
]
},
{
"id": 2,
"occurrence": 0,
"final_mark": null,
"status": "in_progress",
"validated?": null,
"current_team_id": 2,
"project": {
"id": 4,
"name": "Hogwarts Quidditch Cup",
"slug": "hogwarts-quidditch-cup",
"parent_id": null
},
"cursus_ids": [
1
],
"user": {
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2"
},
"teams": [
{
"id": 2,
"name": "podamer2's group",
"url": "https://api.intra.42.fr/v2/teams/2",
"final_mark": null,
"project_id": 4,
"created_at": "2017-11-22T13:41:28.554Z",
"updated_at": "2017-11-22T13:41:28.608Z",
"status": "in_progress",
"terminating_at": null,
"users": [
{
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2",
"leader": true,
"occurrence": 0,
"validated": true,
"projects_user_id": 2
}
],
"locked?": false,
"validated?": null,
"closed?": true,
"repo_url": null,
"repo_uuid": "intra-uuid-ae9bdbbc-9c16-4c27-8f18-eccee5a31020-2",
"locked_at": null,
"closed_at": "2017-11-22T13:41:28.578Z",
"project_session_id": 4
}
]
},
{
"id": 3,
"occurrence": 0,
"final_mark": null,
"status": "creating_group",
"validated?": null,
"current_team_id": 3,
"project": {
"id": 5,
"name": "Quarter Finals",
"slug": "hogwarts-quidditch-cup-quarter-finals",
"parent_id": 4
},
"cursus_ids": [
1
],
"user": {
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2"
},
"teams": [
{
"id": 3,
"name": "podamer2's group",
"url": "https://api.intra.42.fr/v2/teams/3",
"final_mark": null,
"project_id": 5,
"created_at": "2017-11-22T13:41:28.661Z",
"updated_at": "2017-11-22T13:41:28.704Z",
"status": "creating_group",
"terminating_at": null,
"users": [
{
"id": 108,
"login": "podamer2",
"url": "https://api.intra.42.fr/v2/users/podamer2",
"leader": true,
"occurrence": 0,
"validated": true,
"projects_user_id": 3
}
],
"locked?": false,
"validated?": null,
"closed?": false,
"repo_url": null,
"repo_uuid": "intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3",
"locked_at": null,
"closed_at": null,
"project_session_id": 5
}
]
}
]
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_users")
response.status
# => 200
response.parsed
# => [{"id"=>1, "occurrence"=>0, "final_mark"=>nil, "status"=>"in_progress", "validated?"=>nil, "current_team_id"=>1, "project"=>{"id"=>2, "name"=>"Ordinary Wizarding Levels", "slug"=>"ordinary-wizarding-levels", "parent_id"=>nil}, "cursus_ids"=>[1], "user"=>{"id"=>111, "login"=>"jabinks2", "url"=>"https://api.intra.42.fr/v2/users/jabinks2"}, "teams"=>[{"id"=>1, "name"=>"jabinks2's group", "url"=>"https://api.intra.42.fr/v2/teams/1", "final_mark"=>nil, "project_id"=>2, "created_at"=>"2017-11-22T13:41:28.447Z", "updated_at"=>"2017-11-22T13:41:28.519Z", "status"=>"in_progress", "terminating_at"=>nil, "users"=>[{"id"=>111, "login"=>"coundook", "url"=>"https://api.intra.42.fr/v2/users/coundook", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>1}], "locked?"=>true, "validated?"=>nil, "closed?"=>false, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-e8f23ddc-8e52-47a8-87e9-9bd490621cfd-1", "locked_at"=>"2017-11-22T13:41:28.487Z", "closed_at"=>nil, "project_session_id"=>2}]}, {"id"=>2, "occurrence"=>0, "final_mark"=>nil, "status"=>"in_progress", "validated?"=>nil, "current_team_id"=>2, "project"=>{"id"=>4, "name"=>"Hogwarts Quidditch Cup", "slug"=>"hogwarts-quidditch-cup", "parent_id"=>nil}, "cursus_ids"=>[1], "user"=>{"id"=>108, "login"=>"podamer2", "url"=>"https://api.intra.42.fr/v2/users/podamer2"}, "teams"=>[{"id"=>2, "name"=>"podamer2's group", "url"=>"https://api.intra.42.fr/v2/teams/2", "final_mark"=>nil, "project_id"=>4, "created_at"=>"2017-11-22T13:41:28.554Z", "updated_at"=>"2017-11-22T13:41:28.608Z", "status"=>"in_progress", "terminating_at"=>nil, "users"=>[{"id"=>108, "login"=>"podamer2", "url"=>"https://api.intra.42.fr/v2/users/podamer2", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>2}], "locked?"=>false, "validated?"=>nil, "closed?"=>true, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-ae9bdbbc-9c16-4c27-8f18-eccee5a31020-2", "locked_at"=>nil, "closed_at"=>"2017-11-22T13:41:28.578Z", "project_session_id"=>4}]}, {"id"=>3, "occurrence"=>0, "final_mark"=>nil, "status"=>"creating_group", "validated?"=>nil, "current_team_id"=>3, "project"=>{"id"=>5, "name"=>"Quarter Finals", "slug"=>"hogwarts-quidditch-cup-quarter-finals", "parent_id"=>4}, "cursus_ids"=>[1], "user"=>{"id"=>108, "login"=>"podamer2", "url"=>"https://api.intra.42.fr/v2/users/podamer2"}, "teams"=>[{"id"=>3, "name"=>"podamer2's group", "url"=>"https://api.intra.42.fr/v2/teams/3", "final_mark"=>nil, "project_id"=>5, "created_at"=>"2017-11-22T13:41:28.661Z", "updated_at"=>"2017-11-22T13:41:28.704Z", "status"=>"creating_group", "terminating_at"=>nil, "users"=>[{"id"=>108, "login"=>"podamer2", "url"=>"https://api.intra.42.fr/v2/users/podamer2", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>3}], "locked?"=>false, "validated?"=>nil, "closed?"=>false, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3", "locked_at"=>nil, "closed_at"=>nil, "project_session_id"=>5}]}]