live_help Notes

assignment This action requires one of theses roles: Basic staff

settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/patronages_reports/67
200
{
  "id": 67,
  "user_id": 39,
  "begin_at": "2018-06-20T13:42:12.179Z",
  "created_at": "2017-11-22T13:42:12.179Z",
  "updated_at": "2017-11-22T13:42:12.179Z",
  "patronage_id": 67,
  "report_id": 0,
  "validated_at": null,
  "patronage": {
    "id": 67,
    "user_id": 63,
    "godfather_id": 39,
    "ongoing": true,
    "created_at": "2017-11-22T13:42:12.177Z",
    "updated_at": "2017-11-22T13:42:12.181Z"
  },
  "report": {
    "id": 0,
    "name": "Final Debriefing",
    "comment": "",
    "introduction_md": "",
    "disclaimer_md": "",
    "guidelines_md": "Schlitz stumptown tacos locavore ennui chartreuse pork belly. Polaroid vice readymade everyday next level. Jean shorts venmo cold-pressed crucifix.\nRamps truffaut tousled biodiesel sriracha shoreditch ugh actually. Celiac street sartorial normcore gentrify chia fingerstache photo booth. Vinyl next level locavore stumptown truffaut vice.\nEveryday keffiyeh pinterest flannel. Five dollar toast yr listicle trust fund franzen salvia. Humblebrag umami aesthetic pour-over blog before they sold out. Humblebrag occupy deep v.",
    "created_at": "2017-11-22T13:42:11.309Z",
    "updated_at": "2017-11-22T13:42:11.416Z",
    "slug": "final-debriefing",
    "delay_days": 210
  },
  "user": {
    "id": 39,
    "login": "anskywal",
    "url": "https://api.intra.42.fr/v2/users/anskywal"
  },
  "answers": []
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/patronages_reports/67"

{
  "id": 67,
  "user_id": 39,
  "begin_at": "2018-06-20T13:42:12.179Z",
  "created_at": "2017-11-22T13:42:12.179Z",
  "updated_at": "2017-11-22T13:42:12.179Z",
  "patronage_id": 67,
  "report_id": 0,
  "validated_at": null,
  "patronage": {
    "id": 67,
    "user_id": 63,
    "godfather_id": 39,
    "ongoing": true,
    "created_at": "2017-11-22T13:42:12.177Z",
    "updated_at": "2017-11-22T13:42:12.181Z"
  },
  "report": {
    "id": 0,
    "name": "Final Debriefing",
    "comment": "",
    "introduction_md": "",
    "disclaimer_md": "",
    "guidelines_md": "Schlitz stumptown tacos locavore ennui chartreuse pork belly. Polaroid vice readymade everyday next level. Jean shorts venmo cold-pressed crucifix.\nRamps truffaut tousled biodiesel sriracha shoreditch ugh actually. Celiac street sartorial normcore gentrify chia fingerstache photo booth. Vinyl next level locavore stumptown truffaut vice.\nEveryday keffiyeh pinterest flannel. Five dollar toast yr listicle trust fund franzen salvia. Humblebrag umami aesthetic pour-over blog before they sold out. Humblebrag occupy deep v.",
    "created_at": "2017-11-22T13:42:11.309Z",
    "updated_at": "2017-11-22T13:42:11.416Z",
    "slug": "final-debriefing",
    "delay_days": 210
  },
  "user": {
    "id": 39,
    "login": "anskywal",
    "url": "https://api.intra.42.fr/v2/users/anskywal"
  },
  "answers": []
}
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/patronages_reports/67")
response.status
# => 200
response.parsed
# => {"id"=>67, "user_id"=>39, "begin_at"=>"2018-06-20T13:42:12.179Z", "created_at"=>"2017-11-22T13:42:12.179Z", "updated_at"=>"2017-11-22T13:42:12.179Z", "patronage_id"=>67, "report_id"=>0, "validated_at"=>nil, "patronage"=>{"id"=>67, "user_id"=>63, "godfather_id"=>39, "ongoing"=>true, "created_at"=>"2017-11-22T13:42:12.177Z", "updated_at"=>"2017-11-22T13:42:12.181Z"}, "report"=>{"id"=>0, "name"=>"Final Debriefing", "comment"=>"", "introduction_md"=>"", "disclaimer_md"=>"", "guidelines_md"=>"Schlitz stumptown tacos locavore ennui chartreuse pork belly. Polaroid vice readymade everyday next level. Jean shorts venmo cold-pressed crucifix.\nRamps truffaut tousled biodiesel sriracha shoreditch ugh actually. Celiac street sartorial normcore gentrify chia fingerstache photo booth. Vinyl next level locavore stumptown truffaut vice.\nEveryday keffiyeh pinterest flannel. Five dollar toast yr listicle trust fund franzen salvia. Humblebrag umami aesthetic pour-over blog before they sold out. Humblebrag occupy deep v.", "created_at"=>"2017-11-22T13:42:11.309Z", "updated_at"=>"2017-11-22T13:42:11.416Z", "slug"=>"final-debriefing", "delay_days"=>210}, "user"=>{"id"=>39, "login"=>"anskywal", "url"=>"https://api.intra.42.fr/v2/users/anskywal"}, "answers"=>[]}