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

pool_id optional . Must be String

The pool id

balance optional , nil allowed . Must be a Hash
balance[begin_at] optional . Must be Fixnum

The begin at. Must be before end at. .

balance[end_at] optional . Must be Fixnum

The end at. .

balance[pool_id] optional , nil allowed . Must be Fixnum

The pool id.

PUT /v2/balances/191
{
  "balance": {
    "begin_at": "2018-06-16 10:49:28",
    "end_at": "2018-06-16 14:03:41"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"balance":{"begin_at":"2018-06-16 10:49:28","end_at":"2018-06-16 14:03:41"}}' "https://api.intra.42.fr/v2/balances/191"
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 = {balance: {begin_at: "2018-06-16 10:49:28", end_at: "2018-06-16 14:03:41"}}
response = token.put("/v2/balances/191", params: params)
response.status
# => 204
response.parsed
# =>