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": 126,
    "expertise_id": 6,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-11-22T13:41:23.630Z",
    "user_id": 126,
    "expertise": {
      "id": 6,
      "name": "AngularJS",
      "slug": "angularjs",
      "url": "https://api.intra.42.fr/v2/expertises/angularjs",
      "kind": "frameworks",
      "created_at": "2017-11-22T13:41:01.803Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"
    },
    "user": {
      "id": 126,
      "login": "darthcae",
      "url": "https://api.intra.42.fr/v2/users/darthcae"
    }
  },
  {
    "id": 125,
    "expertise_id": 4,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-11-22T13:41:23.614Z",
    "user_id": 125,
    "expertise": {
      "id": 4,
      "name": "C",
      "slug": "c",
      "url": "https://api.intra.42.fr/v2/expertises/c",
      "kind": "languages",
      "created_at": "2017-11-22T13:41:01.791Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/c/expertises_users"
    },
    "user": {
      "id": 125,
      "login": "sebulseb",
      "url": "https://api.intra.42.fr/v2/users/sebulseb"
    }
  },
  {
    "id": 124,
    "expertise_id": 1,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-11-22T13:41:23.598Z",
    "user_id": 124,
    "expertise": {
      "id": 1,
      "name": ".NET",
      "slug": "net",
      "url": "https://api.intra.42.fr/v2/expertises/net",
      "kind": "languages",
      "created_at": "2017-11-22T13:41:01.773Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/net/expertises_users"
    },
    "user": {
      "id": 124,
      "login": "hsolo2",
      "url": "https://api.intra.42.fr/v2/users/hsolo2"
    }
  }
]
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/expertises_users"

[
  {
    "id": 126,
    "expertise_id": 6,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-11-22T13:41:23.630Z",
    "user_id": 126,
    "expertise": {
      "id": 6,
      "name": "AngularJS",
      "slug": "angularjs",
      "url": "https://api.intra.42.fr/v2/expertises/angularjs",
      "kind": "frameworks",
      "created_at": "2017-11-22T13:41:01.803Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"
    },
    "user": {
      "id": 126,
      "login": "darthcae",
      "url": "https://api.intra.42.fr/v2/users/darthcae"
    }
  },
  {
    "id": 125,
    "expertise_id": 4,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-11-22T13:41:23.614Z",
    "user_id": 125,
    "expertise": {
      "id": 4,
      "name": "C",
      "slug": "c",
      "url": "https://api.intra.42.fr/v2/expertises/c",
      "kind": "languages",
      "created_at": "2017-11-22T13:41:01.791Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/c/expertises_users"
    },
    "user": {
      "id": 125,
      "login": "sebulseb",
      "url": "https://api.intra.42.fr/v2/users/sebulseb"
    }
  },
  {
    "id": 124,
    "expertise_id": 1,
    "interested": false,
    "value": 2,
    "contact_me": false,
    "created_at": "2017-11-22T13:41:23.598Z",
    "user_id": 124,
    "expertise": {
      "id": 1,
      "name": ".NET",
      "slug": "net",
      "url": "https://api.intra.42.fr/v2/expertises/net",
      "kind": "languages",
      "created_at": "2017-11-22T13:41:01.773Z",
      "expertises_users_url": "https://api.intra.42.fr/v2/expertises/net/expertises_users"
    },
    "user": {
      "id": 124,
      "login": "hsolo2",
      "url": "https://api.intra.42.fr/v2/users/hsolo2"
    }
  }
]
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"=>126, "expertise_id"=>6, "interested"=>false, "value"=>2, "contact_me"=>false, "created_at"=>"2017-11-22T13:41:23.630Z", "user_id"=>126, "expertise"=>{"id"=>6, "name"=>"AngularJS", "slug"=>"angularjs", "url"=>"https://api.intra.42.fr/v2/expertises/angularjs", "kind"=>"frameworks", "created_at"=>"2017-11-22T13:41:01.803Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/angularjs/expertises_users"}, "user"=>{"id"=>126, "login"=>"darthcae", "url"=>"https://api.intra.42.fr/v2/users/darthcae"}}, {"id"=>125, "expertise_id"=>4, "interested"=>false, "value"=>2, "contact_me"=>false, "created_at"=>"2017-11-22T13:41:23.614Z", "user_id"=>125, "expertise"=>{"id"=>4, "name"=>"C", "slug"=>"c", "url"=>"https://api.intra.42.fr/v2/expertises/c", "kind"=>"languages", "created_at"=>"2017-11-22T13:41:01.791Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/c/expertises_users"}, "user"=>{"id"=>125, "login"=>"sebulseb", "url"=>"https://api.intra.42.fr/v2/users/sebulseb"}}, {"id"=>124, "expertise_id"=>1, "interested"=>false, "value"=>2, "contact_me"=>false, "created_at"=>"2017-11-22T13:41:23.598Z", "user_id"=>124, "expertise"=>{"id"=>1, "name"=>".NET", "slug"=>"net", "url"=>"https://api.intra.42.fr/v2/expertises/net", "kind"=>"languages", "created_at"=>"2017-11-22T13:41:01.773Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/net/expertises_users"}, "user"=>{"id"=>124, "login"=>"hsolo2", "url"=>"https://api.intra.42.fr/v2/users/hsolo2"}}]