live_help Notes

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

settings Params

Param name Description
id required . Must be String

The requested id

projects_user optional , nil allowed . Must be a Hash
projects_user[project_id] optional . Must be Fixnum

The project id.

projects_user[user_id] optional . Must be Fixnum

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

projects_user[occurrence] optional , nil allowed . Must be Fixnum

The occurrence. Default to 0.

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

The final mark.

projects_user[retriable_at] optional , nil allowed . Must be DateTime

The retriable at.

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