live_help Notes

chrome_reader_mode This resource is paginated by 30 items

settings Params

Param name Description
expertise_id optional . Must be String

The expertise id or slug

user_id optional . Must be String

The user id or slug

sort optional . Must be one of: id, expertise_id, user_id, interested, value, created_at, updated_at, contact_me.

The sort field. Sorted by id desc by default.

Example:

To sort on expertises users on the fields updated_at on a descending order and contact_me on a ascending order:

...&sort=-updated_at,contact_me

filter optional . Must be one of: id, expertise_id, user_id, interested, value, created_at, updated_at, contact_me.

Filtering on one or more fields

Example:

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

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

Filterable fields:
  • id (standard field)
  • expertise_id (standard field)
  • user_id (standard field)
  • interested (standard field)
  • value (standard field)
  • created_at (standard field)
  • updated_at (standard field)
  • contact_me (standard field)
range optional . Must be one of: id, expertise_id, user_id, interested, value, created_at, updated_at, contact_me.

Select on a particular range

Example:

To range on expertises users with the contact_me field between min_value and max_value:

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

Rangeable fields:
  • id
  • expertise_id
  • user_id
  • interested
  • value
  • created_at
  • updated_at
  • contact_me
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/expertises_users
200
[
  {
    "id": 66,
    "expertise_id": 6,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-03-06T14:59:01.307Z",
    "user_id": 66,
    "expertise": {
      "id": 6,
      "name": "AngularJS",
      "slug": "angularjs",
      "url": "https://api.intra.42.fr/v2/expertises/angularjs",
      "kind": "frameworks",
      "created_at": "2017-03-06T14:58:45.110Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"
    },
    "user": {
      "id": 66,
      "login": "cdooku",
      "url": "https://api.intra.42.fr/v2/users/cdooku"
    }
  },
  {
    "id": 65,
    "expertise_id": 3,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-03-06T14:59:01.299Z",
    "user_id": 65,
    "expertise": {
      "id": 3,
      "name": "Android",
      "slug": "android",
      "url": "https://api.intra.42.fr/v2/expertises/android",
      "kind": "frameworks",
      "created_at": "2017-03-06T14:58:45.084Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/android/expertises_users"
    },
    "user": {
      "id": 65,
      "login": "jabinks",
      "url": "https://api.intra.42.fr/v2/users/jabinks"
    }
  },
  {
    "id": 64,
    "expertise_id": 9,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-03-06T14:59:01.276Z",
    "user_id": 64,
    "expertise": {
      "id": 9,
      "name": "Elixir",
      "slug": "elixir",
      "url": "https://api.intra.42.fr/v2/expertises/elixir",
      "kind": "languages",
      "created_at": "2017-03-06T14:58:45.143Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/elixir/expertises_users"
    },
    "user": {
      "id": 64,
      "login": "ruhaako",
      "url": "https://api.intra.42.fr/v2/users/ruhaako"
    }
  }
]
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/expertises_users"

[
  {
    "id": 66,
    "expertise_id": 6,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-03-06T14:59:01.307Z",
    "user_id": 66,
    "expertise": {
      "id": 6,
      "name": "AngularJS",
      "slug": "angularjs",
      "url": "https://api.intra.42.fr/v2/expertises/angularjs",
      "kind": "frameworks",
      "created_at": "2017-03-06T14:58:45.110Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"
    },
    "user": {
      "id": 66,
      "login": "cdooku",
      "url": "https://api.intra.42.fr/v2/users/cdooku"
    }
  },
  {
    "id": 65,
    "expertise_id": 3,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-03-06T14:59:01.299Z",
    "user_id": 65,
    "expertise": {
      "id": 3,
      "name": "Android",
      "slug": "android",
      "url": "https://api.intra.42.fr/v2/expertises/android",
      "kind": "frameworks",
      "created_at": "2017-03-06T14:58:45.084Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/android/expertises_users"
    },
    "user": {
      "id": 65,
      "login": "jabinks",
      "url": "https://api.intra.42.fr/v2/users/jabinks"
    }
  },
  {
    "id": 64,
    "expertise_id": 9,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-03-06T14:59:01.276Z",
    "user_id": 64,
    "expertise": {
      "id": 9,
      "name": "Elixir",
      "slug": "elixir",
      "url": "https://api.intra.42.fr/v2/expertises/elixir",
      "kind": "languages",
      "created_at": "2017-03-06T14:58:45.143Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/elixir/expertises_users"
    },
    "user": {
      "id": 64,
      "login": "ruhaako",
      "url": "https://api.intra.42.fr/v2/users/ruhaako"
    }
  }
]
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/expertises_users")
response.status
# => 200
response.parsed
# => [{"id"=>66, "expertise_id"=>6, "interested"=>false, "value"=>2, "contact_me"=>false, "created_at"=>"2017-03-06T14:59:01.307Z", "user_id"=>66, "expertise"=>{"id"=>6, "name"=>"AngularJS", "slug"=>"angularjs", "url"=>"https://api.intra.42.fr/v2/expertises/angularjs", "kind"=>"frameworks", "created_at"=>"2017-03-06T14:58:45.110Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"}, "user"=>{"id"=>66, "login"=>"cdooku", "url"=>"https://api.intra.42.fr/v2/users/cdooku"}}, {"id"=>65, "expertise_id"=>3, "interested"=>false, "value"=>2, "contact_me"=>false, "created_at"=>"2017-03-06T14:59:01.299Z", "user_id"=>65, "expertise"=>{"id"=>3, "name"=>"Android", "slug"=>"android", "url"=>"https://api.intra.42.fr/v2/expertises/android", "kind"=>"frameworks", "created_at"=>"2017-03-06T14:58:45.084Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/android/expertises_users"}, "user"=>{"id"=>65, "login"=>"jabinks", "url"=>"https://api.intra.42.fr/v2/users/jabinks"}}, {"id"=>64, "expertise_id"=>9, "interested"=>false, "value"=>2, "contact_me"=>false, "created_at"=>"2017-03-06T14:59:01.276Z", "user_id"=>64, "expertise"=>{"id"=>9, "name"=>"Elixir", "slug"=>"elixir", "url"=>"https://api.intra.42.fr/v2/expertises/elixir", "kind"=>"languages", "created_at"=>"2017-03-06T14:58:45.143Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/elixir/expertises_users"}, "user"=>{"id"=>64, "login"=>"ruhaako", "url"=>"https://api.intra.42.fr/v2/users/ruhaako"}}]