live_help Notes

assignment This action requires one of theses roles: Student tutor, Advanced tutor, Advanced staff
group_work Requires following application scopes: projects

settings Params

Param name Description
id required . Must be String

The requested id

partnerships_user optional , nil allowed . Must be a Hash
partnerships_user[partnership_id] optional . Must be Fixnum

The partnership id. Must be unique in the scope of a given user.

partnerships_user[user_id] optional . Must be Fixnum

The user id.

partnerships_user[final_mark] optional , nil allowed . Must be Fixnum

The final mark.

PUT /v2/partnerships_users/5
{
  "partnerships_user": {
    "partnership_id": "1",
    "user_id": "99"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"partnerships_user":{"partnership_id":"1","user_id":"99"}}' "https://api.intra.42.fr/v2/partnerships_users/5"
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 = {partnerships_user: {partnership_id: "1", user_id: "99"}}
response = token.put("/v2/partnerships_users/5", params: params)
response.status
# => 204
response.parsed
# =>