live_help Notes

chrome_reader_mode This resource is paginated by 30 items

settings Params

Param name Description
sort optional . Must be one of: id, name, slug, created_at, updated_at, kind.

The sort field. Sorted by created_at desc by default.

Example:

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

...&sort=-updated_at,kind

filter optional . Must be one of: id, name, slug, created_at, updated_at, kind.

Filtering on one or more fields

Example:

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

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

Filterable fields:
  • id (standard field)
  • name (standard field)
  • slug (standard field)
  • created_at (standard field)
  • updated_at (standard field)
  • kind (standard field)
range optional . Must be one of: id, name, slug, created_at, updated_at, kind.

Select on a particular range

Example:

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

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

Rangeable fields:
  • id
  • name
  • slug
  • created_at
  • updated_at
  • kind
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
200
[
  {
    "id": 10,
    "name": "Magic",
    "slug": "magic",
    "url": "https://api.intra.42.fr/v2/expertises/magic",
    "kind": "languages",
    "created_at": "2017-11-22T13:41:01.825Z",
    "expertises_users_url": "https://api.intra.42.fr/v2/expertises/magic/expertises_users"
  },
  {
    "id": 9,
    "name": "Elixir",
    "slug": "elixir",
    "url": "https://api.intra.42.fr/v2/expertises/elixir",
    "kind": "languages",
    "created_at": "2017-11-22T13:41:01.819Z",
    "expertises_users_url": "https://api.intra.42.fr/v2/expertises/elixir/expertises_users"
  },
  {
    "id": 8,
    "name": "iOS",
    "slug": "ios",
    "url": "https://api.intra.42.fr/v2/expertises/ios",
    "kind": "frameworks",
    "created_at": "2017-11-22T13:41:01.814Z",
    "expertises_users_url": "https://api.intra.42.fr/v2/expertises/ios/expertises_users"
  }
]
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/expertises"

[
  {
    "id": 10,
    "name": "Magic",
    "slug": "magic",
    "url": "https://api.intra.42.fr/v2/expertises/magic",
    "kind": "languages",
    "created_at": "2017-11-22T13:41:01.825Z",
    "expertises_users_url": "https://api.intra.42.fr/v2/expertises/magic/expertises_users"
  },
  {
    "id": 9,
    "name": "Elixir",
    "slug": "elixir",
    "url": "https://api.intra.42.fr/v2/expertises/elixir",
    "kind": "languages",
    "created_at": "2017-11-22T13:41:01.819Z",
    "expertises_users_url": "https://api.intra.42.fr/v2/expertises/elixir/expertises_users"
  },
  {
    "id": 8,
    "name": "iOS",
    "slug": "ios",
    "url": "https://api.intra.42.fr/v2/expertises/ios",
    "kind": "frameworks",
    "created_at": "2017-11-22T13:41:01.814Z",
    "expertises_users_url": "https://api.intra.42.fr/v2/expertises/ios/expertises_users"
  }
]
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")
response.status
# => 200
response.parsed
# => [{"id"=>10, "name"=>"Magic", "slug"=>"magic", "url"=>"https://api.intra.42.fr/v2/expertises/magic", "kind"=>"languages", "created_at"=>"2017-11-22T13:41:01.825Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/magic/expertises_users"}, {"id"=>9, "name"=>"Elixir", "slug"=>"elixir", "url"=>"https://api.intra.42.fr/v2/expertises/elixir", "kind"=>"languages", "created_at"=>"2017-11-22T13:41:01.819Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/elixir/expertises_users"}, {"id"=>8, "name"=>"iOS", "slug"=>"ios", "url"=>"https://api.intra.42.fr/v2/expertises/ios", "kind"=>"frameworks", "created_at"=>"2017-11-22T13:41:01.814Z", "expertises_users_url"=>"https://api.intra.42.fr/v2/expertises/ios/expertises_users"}]