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/6
200
{
  "id": 6,
  "user_id": 48,
  "begin_at": "2017-10-02T14:59:36.800Z",
  "created_at": "2017-03-06T14:59:36.801Z",
  "updated_at": "2017-03-06T14:59:36.801Z",
  "patronage_id": 6,
  "report_id": 0,
  "validated_at": null,
  "patronage": {
    "id": 6,
    "user_id": 23,
    "godfather_id": 48,
    "ongoing": true,
    "created_at": "2017-03-06T14:59:36.797Z",
    "updated_at": "2017-03-06T14:59:36.803Z"
  },
  "report": {
    "id": 0,
    "name": "Final Debriefing",
    "comment": "",
    "introduction_md": "",
    "disclaimer_md": "",
    "guidelines_md": "Franzen letterpress ennui intelligentsia cliche. Sriracha cronut asymmetrical five dollar toast squid goth vinyl. Thundercats tilde synth. Sustainable narwhal williamsburg echo.\n3 wolf moon post-ironic wes anderson you probably haven't heard of them neutra williamsburg butcher. Put a bird on it pbr&b drinking microdosing vhs occupy green juice. Pitchfork blue bottle photo booth. Fap raw denim cornhole yr franzen church-key.\nTofu yolo deep v beard disrupt. Helvetica +1 goth everyday truffaut. Banjo everyday small batch dreamcatcher yuccie deep v art party scenester. Carry 8-bit roof pinterest bicycle rights franzen organic. Gastropub pop-up occupy.",
    "created_at": "2017-03-06T14:59:36.513Z",
    "updated_at": "2017-03-06T14:59:36.551Z",
    "slug": "final-debriefing",
    "delay_days": 210
  },
  "user": {
    "id": 48,
    "login": "dmaul",
    "url": "https://api.intra.42.fr/v2/users/dmaul"
  },
  "answers": []
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/patronages_reports/6"

{
  "id": 6,
  "user_id": 48,
  "begin_at": "2017-10-02T14:59:36.800Z",
  "created_at": "2017-03-06T14:59:36.801Z",
  "updated_at": "2017-03-06T14:59:36.801Z",
  "patronage_id": 6,
  "report_id": 0,
  "validated_at": null,
  "patronage": {
    "id": 6,
    "user_id": 23,
    "godfather_id": 48,
    "ongoing": true,
    "created_at": "2017-03-06T14:59:36.797Z",
    "updated_at": "2017-03-06T14:59:36.803Z"
  },
  "report": {
    "id": 0,
    "name": "Final Debriefing",
    "comment": "",
    "introduction_md": "",
    "disclaimer_md": "",
    "guidelines_md": "Franzen letterpress ennui intelligentsia cliche. Sriracha cronut asymmetrical five dollar toast squid goth vinyl. Thundercats tilde synth. Sustainable narwhal williamsburg echo.\n3 wolf moon post-ironic wes anderson you probably haven't heard of them neutra williamsburg butcher. Put a bird on it pbr&b drinking microdosing vhs occupy green juice. Pitchfork blue bottle photo booth. Fap raw denim cornhole yr franzen church-key.\nTofu yolo deep v beard disrupt. Helvetica +1 goth everyday truffaut. Banjo everyday small batch dreamcatcher yuccie deep v art party scenester. Carry 8-bit roof pinterest bicycle rights franzen organic. Gastropub pop-up occupy.",
    "created_at": "2017-03-06T14:59:36.513Z",
    "updated_at": "2017-03-06T14:59:36.551Z",
    "slug": "final-debriefing",
    "delay_days": 210
  },
  "user": {
    "id": 48,
    "login": "dmaul",
    "url": "https://api.intra.42.fr/v2/users/dmaul"
  },
  "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/6")
response.status
# => 200
response.parsed
# => {"id"=>6, "user_id"=>48, "begin_at"=>"2017-10-02T14:59:36.800Z", "created_at"=>"2017-03-06T14:59:36.801Z", "updated_at"=>"2017-03-06T14:59:36.801Z", "patronage_id"=>6, "report_id"=>0, "validated_at"=>nil, "patronage"=>{"id"=>6, "user_id"=>23, "godfather_id"=>48, "ongoing"=>true, "created_at"=>"2017-03-06T14:59:36.797Z", "updated_at"=>"2017-03-06T14:59:36.803Z"}, "report"=>{"id"=>0, "name"=>"Final Debriefing", "comment"=>"", "introduction_md"=>"", "disclaimer_md"=>"", "guidelines_md"=>"Franzen letterpress ennui intelligentsia cliche. Sriracha cronut asymmetrical five dollar toast squid goth vinyl. Thundercats tilde synth. Sustainable narwhal williamsburg echo.\n3 wolf moon post-ironic wes anderson you probably haven't heard of them neutra williamsburg butcher. Put a bird on it pbr&b drinking microdosing vhs occupy green juice. Pitchfork blue bottle photo booth. Fap raw denim cornhole yr franzen church-key.\nTofu yolo deep v beard disrupt. Helvetica +1 goth everyday truffaut. Banjo everyday small batch dreamcatcher yuccie deep v art party scenester. Carry 8-bit roof pinterest bicycle rights franzen organic. Gastropub pop-up occupy.", "created_at"=>"2017-03-06T14:59:36.513Z", "updated_at"=>"2017-03-06T14:59:36.551Z", "slug"=>"final-debriefing", "delay_days"=>210}, "user"=>{"id"=>48, "login"=>"dmaul", "url"=>"https://api.intra.42.fr/v2/users/dmaul"}, "answers"=>[]}