Return all the public created applications working with the APIv2.

If there is a resource owner, also returns the resource owner applications, public or not.

live_help Notes

chrome_reader_mode This resource is paginated by 30 items
assignment_ind This action have additional content with a token resource owner .

settings Params

Param name Description
user_id optional . Must be String

The user id or slug

sort optional . Must be one of: id, name, token, user_id, created_at, updated_at, allowed_origins.

The sort field. Sorted by id desc by default.

Example:

To sort on apps on the fields updated_at on a descending order and allowed_origins on a ascending order:

...&sort=-updated_at,allowed_origins

filter optional . Must be one of: id, name, uid, owner_id, website.

Filtering on one or more fields

Example:

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

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

Filterable fields:
  • id (standard field)
  • name (standard field)
  • uid (standard field)
  • owner_id (standard field)
  • website (standard field)
range optional . Must be one of: id, name, uid, owner_id, website.

Select on a particular range

Example:

To range on apps with the website field between min_value and max_value:

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

Rangeable fields:
  • id
  • name
  • uid
  • owner_id
  • website
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/apps
200
[
  {
    "id": 1,
    "name": "Endeavour",
    "description": null,
    "image": null,
    "website": null,
    "public": true,
    "scopes": [
      "public"
    ],
    "created_at": "2017-03-06T14:59:37.683Z",
    "updated_at": "2017-03-06T15:00:16.080Z",
    "owner": {},
    "rate_limit": 500,
    "roles": [
      {
        "id": 16,
        "name": "Official App",
        "description": "Approved application without rate limits"
      }
    ]
  }
]
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/apps"

[
  {
    "id": 1,
    "name": "Endeavour",
    "description": null,
    "image": null,
    "website": null,
    "public": true,
    "scopes": [
      "public"
    ],
    "created_at": "2017-03-06T14:59:37.683Z",
    "updated_at": "2017-03-06T15:00:16.080Z",
    "owner": {},
    "rate_limit": 500,
    "roles": [
      {
        "id": 16,
        "name": "Official App",
        "description": "Approved application without rate limits"
      }
    ]
  }
]
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/apps")
response.status
# => 200
response.parsed
# => [{"id"=>1, "name"=>"Endeavour", "description"=>nil, "image"=>nil, "website"=>nil, "public"=>true, "scopes"=>["public"], "created_at"=>"2017-03-06T14:59:37.683Z", "updated_at"=>"2017-03-06T15:00:16.080Z", "owner"=>{}, "rate_limit"=>500, "roles"=>[{"id"=>16, "name"=>"Official App", "description"=>"Approved application without rate limits"}]}]