live_help Notes

assignment This action requires one of theses roles: Advanced tutor

settings Params

Param name Description
id required . Must be String

The requested id

quest optional , nil allowed . Must be a Hash
quest[id] optional , nil allowed . Must be Fixnum

The id.

quest[name] optional . Must be String

The name.

quest[slug] optional , nil allowed . Must be String

The slug.

quest[kind] optional . Must be one of: main, optional, mandatory, repeatable.

The kind.

quest[internal_name] optional , nil allowed . Must be String

The internal name.

quest[duration] optional . Must be Fixnum

The duration.

quest[ancestry] optional , nil allowed . Must be String

The ancestry.

quest[description] optional . Must be String

The description.

quest[guild_size] optional , nil allowed . Must be Fixnum

The guild size.

quest[guild_prct] optional , nil allowed . Must be Fixnum

The guild prct.

quest[cursus_id] optional . Must be Fixnum

The cursus id.

quest[campus_id] optional , nil allowed . Must be Fixnum

The campus id.

quest[created_at] optional , nil allowed . Must be DateTime

The created at.

quest[updated_at] optional , nil allowed . Must be DateTime

The updated at.

quest[grade_id] optional , nil allowed . Must be Fixnum

The grade id.

quest[position] optional , nil allowed . Must be Fixnum

The position.

quest[tries_number] optional . Must be Fixnum

The tries number.

quest[success_number] optional . Must be Fixnum

The success number.

quest[close_on_fail] optional , nil allowed . Must be one of: true, false.

Is it close on fail ?

quest[mails_from] optional . Must be String

The mails from.

quest[parent_id] optional , nil allowed . Must be String

The parent id.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/quests/1
{
  "quest": {
    "close_on_fail": "",
    "cursus_id": "2",
    "description": "You must take a coffee.",
    "kind": "main",
    "mails": "",
    "mails_from": "",
    "name": "Take a coffee ☕️",
    "success_number": "",
    "tries_number": ""
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"quest":{"close_on_fail":"","cursus_id":"2","description":"You must take a coffee.","kind":"main","mails":"","mails_from":"","name":"Take a coffee ☕️","success_number":"","tries_number":""}}' "https://api.intra.42.fr/v2/quests/1"
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

params = {quest: {close_on_fail: "", cursus_id: "2", description: "You must take a coffee.", kind: "main", mails: "", mails_from: "", name: "Take a coffee ☕️", success_number: "", tries_number: ""}}
response = token.put("/v2/quests/1", params: params)
response.status
# => 204
response.parsed
# =>