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

dash optional , nil allowed . Must be a Hash
dash[name] optional . Must be String

The name. Must be unique in the scope of a given cursus.

dash[description] optional . Must be String

The description.

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

The slug.

dash[cursus_id] optional . Must be Fixnum

The cursus id.

dash[campus_id] optional . Must be Fixnum

The campus id.

dash[skill_id] optional . Must be Fixnum

The skill id.

dash[nbr_xp] optional . Must be String

The nbr xp.

dash[begin_at] optional . Must be Fixnum

The begin at. Must be after today.

dash[duration] optional . Must be Fixnum

The duration.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/dashes/1
{
  "dash": {
    "begin_at": "2017-11-25 13:43:35 UTC",
    "campus_id": "1",
    "cursus_id": "2",
    "description": "Le sujet dbon courage!",
    "duration": "20",
    "name": "Dashname",
    "nbr_xp": "20",
    "skill_id": "2",
    "slug": "dashname"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"dash":{"begin_at":"2017-11-25 13:43:35 UTC","campus_id":"1","cursus_id":"2","description":"Le sujet dbon courage!","duration":"20","name":"Dashname","nbr_xp":"20","skill_id":"2","slug":"dashname"}}' "https://api.intra.42.fr/v2/dashes/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 = {dash: {begin_at: "2017-11-25 13:43:35 UTC", campus_id: "1", cursus_id: "2", description: "Le sujet dbon courage!", duration: "20", name: "Dashname", nbr_xp: "20", skill_id: "2", slug: "dashname"}}
response = token.put("/v2/dashes/1", params: params)
response.status
# => 204
response.parsed
# =>