live_help Notes

assignment_ind This action requires a token resource owner scoped on projects with enough privileges or an application with one of theses role(s): Advanced tutor .

settings Params

Param name Description
id required . Must be String

The requested id

scale_team optional , nil allowed . Must be a Hash
scale_team[team_id] optional . Must be Fixnum

The team id.

scale_team[scale_id] optional . Must be Fixnum

The scale id.

scale_team[comment] optional . Must be String

The comment.

scale_team[flag] optional , nil allowed . Must be String

The flag.

scale_team[feedback] optional . Must be String

The feedback.

scale_team[feedback_rating] optional , nil allowed . Must be Fixnum

The feedback rating.

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

The final mark.

scale_team[truant_id] optional , nil allowed . Must be Fixnum

The truant id.

scale_team[answers_attributes] optional , nil allowed . Must be an Array of nested elements

The answers attributes.

scale_team[answers_attributes][question_id] optional . Must be Fixnum

The question id. Must be unique in the scope of a given scalable entity.

scale_team[answers_attributes][value] optional , nil allowed . Must be Fixnum

The value.

scale_team[answers_attributes][id] optional , nil allowed . Must be Fixnum

The id.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/scale_teams/1
{
  "scale_team": {
    "begin_at": "2017-11-27 09:00:00 UTC",
    "scale_id": "1",
    "team_id": "66"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"scale_team":{"begin_at":"2017-11-27 09:00:00 UTC","scale_id":"1","team_id":"66"}}' "https://api.intra.42.fr/v2/scale_teams/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 = {scale_team: {begin_at: "2017-11-27 09:00:00 UTC", scale_id: "1", team_id: "66"}}
response = token.put("/v2/scale_teams/1", params: params)
response.status
# => 204
response.parsed
# =>