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

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

The name. Must be unique.

cursus[kind] optional , nil allowed . Must be one of: normal, piscine, external.

The kind.

cursus[skill_ids] optional , nil allowed . Must be an array of Integer

The skill ids.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/cursus/2
{
  "cursus": {
    "name": "Oregon kangaroos",
    "skill_ids": [
      "13",
      "14"
    ]
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"cursus":{"name":"Oregon kangaroos","skill_ids":["13","14"]}}' "https://api.intra.42.fr/v2/cursus/2"
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 = {cursus: {name: "Oregon kangaroos", skill_ids: ["13", "14"]}}
response = token.put("/v2/cursus/2", params: params)
response.status
# => 204
response.parsed
# =>