live_help Notes

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

settings Params

Param name Description
id required . Must be String

The requested id

project_session optional , nil allowed . Must be a Hash
project_session[id] optional , nil allowed . Must be Fixnum

The id.

project_session[campus_id] optional , nil allowed . Must be Fixnum

The campus id.

project_session[project_id] optional . Must be Fixnum

The project id. Must be unique in the scope of a given cursus id and campus.

project_session[cursus_id] optional , nil allowed . Must be Fixnum

The cursus id.

project_session[estimate_time] optional , nil allowed . Must be Fixnum

The estimate time.

project_session[created_at] optional , nil allowed . Must be DateTime

The created at.

project_session[updated_at] optional , nil allowed . Must be DateTime

The updated at.

project_session[begin_at] optional , nil allowed . Must be DateTime

The begin at.

project_session[end_at] optional , nil allowed . Must be DateTime

The end at.

project_session[max_people] optional , nil allowed . Must be Fixnum

The max people.

project_session[duration_days] optional , nil allowed . Must be Fixnum

The duration days.

project_session[terminating_after] optional , nil allowed . Must be Fixnum

The terminating after.

project_session[solo] optional , nil allowed . Must be one of: true, false.

Is it solo ? Default to false.

project_session[is_subscriptable] optional , nil allowed . Must be one of: true, false.

Is it is subscriptable ? Default to true.

project_session[minimum_mark] optional . Must be Fixnum

The minimum mark.

project_session[team_behaviour] optional . Must be one of: user, upload, by_rule, none.

The team behaviour.

project_session[evaluations_attributes] optional , nil allowed . Must be an Array of nested elements

The evaluations attributes.

project_session[evaluations_attributes][id] optional , nil allowed . Must be Fixnum

The id.

project_session[evaluations_attributes][kind] optional , nil allowed . Must be one of: scale, upload.

The kind.

project_session[evaluations_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

project_session[evaluations_project_sessions_attributes] optional , nil allowed . Must be an Array of nested elements

The evaluations project sessions attributes.

project_session[evaluations_project_sessions_attributes][evaluation_id] optional . Must be Fixnum

The evaluation id.

project_session[evaluations_project_sessions_attributes][project_session_id] optional , nil allowed . Must be Fixnum

The project session id.

project_session[evaluations_project_sessions_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

project_session[evaluations_project_sessions_attributes][id] optional , nil allowed . Must be Fixnum

The id.

project_session[project_sessions_rules_attributes] optional , nil allowed . Must be an Array of nested elements

The project sessions rules attributes.

project_session[project_sessions_rules_attributes][id] optional , nil allowed . Must be Fixnum

The id.

project_session[project_sessions_rules_attributes][rule_id] optional . Must be Fixnum

The rule id.

project_session[project_sessions_rules_attributes][required] optional , nil allowed . Must be one of: true, false.

Is it required ?

project_session[project_sessions_rules_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes] optional , nil allowed . Must be an Array of nested elements

The params project sessions rules attributes.

project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][id] optional , nil allowed . Must be Fixnum

The id.

project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][param_id] optional , nil allowed . Must be Fixnum

The param id.

project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][value] optional , nil allowed . Must be String

The value.

project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/project_sessions/2
{
  "project_session": {
    "campus_id": "",
    "cursus_id": "",
    "estimate_time": "2592000",
    "is_subscriptable": "true",
    "minimum_mark": "77",
    "solo": "true",
    "team_behaviour": "user"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"project_session":{"campus_id":"","cursus_id":"","estimate_time":"2592000","is_subscriptable":"true","minimum_mark":"77","solo":"true","team_behaviour":"user"}}' "https://api.intra.42.fr/v2/project_sessions/2"
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 = {project_session: {campus_id: "", cursus_id: "", estimate_time: "2592000", is_subscriptable: "true", minimum_mark: "77", solo: "true", team_behaviour: "user"}}
response = token.put("/v2/project_sessions/2", params: params)
response.status
# => 204
response.parsed
# =>