live_help Notes

assignment This action requires one of theses roles: Basic staff

settings Params

Param name Description
user_id optional . Must be String

The user id or slug

id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/user_candidatures/20
200
{
  "id": 20,
  "user_id": 20,
  "birth_date": "1990-06-15",
  "gender": "female",
  "zip_code": "49563",
  "country": "Takodana",
  "birth_city": "Port Alisonfurt",
  "birth_country": "Alderaan",
  "postal_street": "48117 Elta Burg",
  "postal_complement": null,
  "postal_city": "East Sophie",
  "postal_zip_code": null,
  "postal_country": null,
  "contact_affiliation": null,
  "contact_last_name": null,
  "contact_first_name": null,
  "contact_phone1": null,
  "contact_phone2": null,
  "max_level_memory": null,
  "max_level_logic": null,
  "other_information": null,
  "language": null,
  "meeting_date": null,
  "piscine_date": null,
  "created_at": "2017-03-06T14:58:50.068Z",
  "updated_at": "2017-03-06T14:58:50.091Z",
  "phone": null,
  "email": "padme_amidala@rosenbaum.com",
  "pin": null
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/user_candidatures/20"

{
  "id": 20,
  "user_id": 20,
  "birth_date": "1990-06-15",
  "gender": "female",
  "zip_code": "49563",
  "country": "Takodana",
  "birth_city": "Port Alisonfurt",
  "birth_country": "Alderaan",
  "postal_street": "48117 Elta Burg",
  "postal_complement": null,
  "postal_city": "East Sophie",
  "postal_zip_code": null,
  "postal_country": null,
  "contact_affiliation": null,
  "contact_last_name": null,
  "contact_first_name": null,
  "contact_phone1": null,
  "contact_phone2": null,
  "max_level_memory": null,
  "max_level_logic": null,
  "other_information": null,
  "language": null,
  "meeting_date": null,
  "piscine_date": null,
  "created_at": "2017-03-06T14:58:50.068Z",
  "updated_at": "2017-03-06T14:58:50.091Z",
  "phone": null,
  "email": "padme_amidala@rosenbaum.com",
  "pin": null
}
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/user_candidatures/20")
response.status
# => 200
response.parsed
# => {"id"=>20, "user_id"=>20, "birth_date"=>"1990-06-15", "gender"=>"female", "zip_code"=>"49563", "country"=>"Takodana", "birth_city"=>"Port Alisonfurt", "birth_country"=>"Alderaan", "postal_street"=>"48117 Elta Burg", "postal_complement"=>nil, "postal_city"=>"East Sophie", "postal_zip_code"=>nil, "postal_country"=>nil, "contact_affiliation"=>nil, "contact_last_name"=>nil, "contact_first_name"=>nil, "contact_phone1"=>nil, "contact_phone2"=>nil, "max_level_memory"=>nil, "max_level_logic"=>nil, "other_information"=>nil, "language"=>nil, "meeting_date"=>nil, "piscine_date"=>nil, "created_at"=>"2017-03-06T14:58:50.068Z", "updated_at"=>"2017-03-06T14:58:50.091Z", "phone"=>nil, "email"=>"padme_amidala@rosenbaum.com", "pin"=>nil}