live_help Notes

assignment This action requires one of theses roles: Advanced staff, Events manager

settings Params

Param name Description
event_id optional . Must be String

The event id

exam_id optional . Must be String

The exam id

id required . Must be String

The requested id

GET /v2/events/2530/waitlist
200
{
  "created_at": "2018-09-19T15:15:33.124Z",
  "id": 32,
  "waitlistable_id": 2530,
  "waitlistable_type": "Event"
}
GET /v2/waitlists/32
200
{
  "created_at": "2018-09-19T15:15:33.124Z",
  "id": 32,
  "waitlistable_id": 2530,
  "waitlistable_type": "Event"
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/events/2530/waitlist"

{
  "created_at": "2018-09-19T15:15:33.124Z",
  "id": 32,
  "waitlistable_id": 2530,
  "waitlistable_type": "Event"
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/waitlists/32"

{
  "created_at": "2018-09-19T15:15:33.124Z",
  "id": 32,
  "waitlistable_id": 2530,
  "waitlistable_type": "Event"
}
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/events/2530/waitlist")
response.status
# => 200
response.parsed
# => {"created_at"=>"2018-09-19T15:15:33.124Z", "id"=>32, "waitlistable_id"=>2530, "waitlistable_type"=>"Event"}
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/waitlists/32")
response.status
# => 200
response.parsed
# => {"created_at"=>"2018-09-19T15:15:33.124Z", "id"=>32, "waitlistable_id"=>2530, "waitlistable_type"=>"Event"}