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

bloc_deadline optional , nil allowed . Must be a Hash
bloc_deadline[bloc_id] optional . Must be Fixnum

The bloc id.

bloc_deadline[begin_at] optional . Must be DateTime

The begin at.

bloc_deadline[end_at] optional . Must be DateTime

The end at.

bloc_deadline[coalition_id] optional , nil allowed . Must be Fixnum

The coalition id.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/bloc_deadlines/1
{
  "bloc_deadline": {
    "begin_at": "2022-11-29",
    "bloc_id": "1",
    "coalition_id": "2",
    "end_at": "2023-11-29"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"bloc_deadline":{"begin_at":"2022-11-29","bloc_id":"1","coalition_id":"2","end_at":"2023-11-29"}}' "https://api.intra.42.fr/v2/bloc_deadlines/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 = {bloc_deadline: {begin_at: "2022-11-29", bloc_id: "1", coalition_id: "2", end_at: "2023-11-29"}}
response = token.put("/v2/bloc_deadlines/1", params: params)
response.status
# => 204
response.parsed
# =>