live_help Notes

assignment_ind This action requires a token resource owner scoped on forum with enough privileges or an application with one of theses role(s): Basic staff, Community manager .

settings Params

Param name Description
id required . Must be String

The requested id

cursus_topic optional , nil allowed . Must be a Hash
cursus_topic[cursus_id] optional . Must be Fixnum

The cursus id.

cursus_topic[topic_id] optional . Must be Fixnum

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

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/cursus_topics/1
{
  "cursus_topic": {
    "cursus_id": "2",
    "topic_id": "2"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"cursus_topic":{"cursus_id":"2","topic_id":"2"}}' "https://api.intra.42.fr/v2/cursus_topics/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 = {cursus_topic: {cursus_id: "2", topic_id: "2"}}
response = token.put("/v2/cursus_topics/1", params: params)
response.status
# => 204
response.parsed
# =>