Creating a new scale_team without an user_id and with a final_mark will act as a moulinette mark.

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
scale_team optional , nil allowed . Must be a Hash
scale_team[team_id] required . Must be Fixnum

The team id.

scale_team[scale_id] required . Must be Fixnum

The scale id.

scale_team[comment] required . Must be String

The comment.

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

The flag.

scale_team[feedback] required . 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] required . 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>
POST /v2/scale_teams
{
  "scale_team": {
    "scale_id": "1",
    "team_id": "34"
  }
}
201
{
  "id": 11,
  "scale_id": 1,
  "comment": null,
  "created_at": "2017-03-06T15:20:33.486Z",
  "updated_at": "2017-03-06T15:20:33.486Z",
  "feedback": null,
  "feedback_rating": null,
  "final_mark": null,
  "flag": {
    "id": 1,
    "name": "Ok",
    "positive": true,
    "icon": "check-4",
    "created_at": "2017-03-06T14:58:45.166Z",
    "updated_at": "2017-03-06T14:58:45.166Z"
  },
  "begin_at": null,
  "correcteds": [
    {
      "id": 66,
      "login": "jbinks2",
      "url": "https://api.intra.42.fr/v2/users/jbinks2"
    }
  ],
  "corrector": {},
  "truant": {},
  "scale": {
    "id": 1,
    "evaluation_id": 1,
    "name": "South Carolina vixens",
    "is_primary": true,
    "comment": "Rem dolor green juice. Et hammock taxidermy farm-to-table placeat bushwick tattooed. Ea sit celiac trust fund photo booth. Soluta aut iusto locavore aut tilde.",
    "introduction_md": "Synth enim twee vitae chillwave ut. Helvetica corporis pbr&b excepturi keytar quae inventore. Rem dolores et est numquam seitan qui.",
    "disclaimer_md": "Mlkshk illo lo-fi. Distillery vinyl actually literally meh franzen. Organic heirloom laudantium pbr&b venmo. Five dollar toast vinegar dolores farm-to-table.",
    "guidelines_md": "Et saepe aut doloribus farm-to-table aut selfies laboriosam. Quo quisquam corporis fugiat est migas.",
    "created_at": "2017-03-06T14:59:05.553Z",
    "correction_number": 3,
    "duration": 1800,
    "manual_subscription": true,
    "languages": [
      {
        "id": 2,
        "name": "English",
        "identifier": "en",
        "created_at": "2017-03-06T14:58:43.172Z",
        "updated_at": "2017-03-06T14:58:43.172Z"
      }
    ]
  },
  "team": {
    "id": 34,
    "name": "cdooku's group",
    "url": "https://api.intra.42.fr/v2/teams/34",
    "final_mark": null,
    "project_id": 1,
    "created_at": "2017-03-06T14:59:11.365Z",
    "updated_at": "2017-03-06T15:20:33.491Z",
    "status": "waiting_for_correction",
    "terminating_at": null,
    "users": [
      {
        "id": 66,
        "login": "jbinks2",
        "url": "https://api.intra.42.fr/v2/users/jbinks2",
        "leader": true,
        "occurrence": 0,
        "validated": true,
        "projects_user_id": 34
      }
    ],
    "locked?": true,
    "validated?": null,
    "closed?": true,
    "repo_url": null,
    "repo_uuid": "intra-uuid-e595b115-a857-4ea9-bc02-fde6947e9480-34",
    "locked_at": "2017-03-06T14:59:11.442Z",
    "closed_at": "2017-03-06T14:59:11.471Z",
    "project_session_id": 1
  },
  "feedbacks": []
}
curl  -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"scale_team":{"scale_id":"1","team_id":"34"}}' "https://api.intra.42.fr/v2/scale_teams"

{
  "id": 11,
  "scale_id": 1,
  "comment": null,
  "created_at": "2017-03-06T15:20:33.486Z",
  "updated_at": "2017-03-06T15:20:33.486Z",
  "feedback": null,
  "feedback_rating": null,
  "final_mark": null,
  "flag": {
    "id": 1,
    "name": "Ok",
    "positive": true,
    "icon": "check-4",
    "created_at": "2017-03-06T14:58:45.166Z",
    "updated_at": "2017-03-06T14:58:45.166Z"
  },
  "begin_at": null,
  "correcteds": [
    {
      "id": 66,
      "login": "jbinks2",
      "url": "https://api.intra.42.fr/v2/users/jbinks2"
    }
  ],
  "corrector": {},
  "truant": {},
  "scale": {
    "id": 1,
    "evaluation_id": 1,
    "name": "South Carolina vixens",
    "is_primary": true,
    "comment": "Rem dolor green juice. Et hammock taxidermy farm-to-table placeat bushwick tattooed. Ea sit celiac trust fund photo booth. Soluta aut iusto locavore aut tilde.",
    "introduction_md": "Synth enim twee vitae chillwave ut. Helvetica corporis pbr&b excepturi keytar quae inventore. Rem dolores et est numquam seitan qui.",
    "disclaimer_md": "Mlkshk illo lo-fi. Distillery vinyl actually literally meh franzen. Organic heirloom laudantium pbr&b venmo. Five dollar toast vinegar dolores farm-to-table.",
    "guidelines_md": "Et saepe aut doloribus farm-to-table aut selfies laboriosam. Quo quisquam corporis fugiat est migas.",
    "created_at": "2017-03-06T14:59:05.553Z",
    "correction_number": 3,
    "duration": 1800,
    "manual_subscription": true,
    "languages": [
      {
        "id": 2,
        "name": "English",
        "identifier": "en",
        "created_at": "2017-03-06T14:58:43.172Z",
        "updated_at": "2017-03-06T14:58:43.172Z"
      }
    ]
  },
  "team": {
    "id": 34,
    "name": "cdooku's group",
    "url": "https://api.intra.42.fr/v2/teams/34",
    "final_mark": null,
    "project_id": 1,
    "created_at": "2017-03-06T14:59:11.365Z",
    "updated_at": "2017-03-06T15:20:33.491Z",
    "status": "waiting_for_correction",
    "terminating_at": null,
    "users": [
      {
        "id": 66,
        "login": "jbinks2",
        "url": "https://api.intra.42.fr/v2/users/jbinks2",
        "leader": true,
        "occurrence": 0,
        "validated": true,
        "projects_user_id": 34
      }
    ],
    "locked?": true,
    "validated?": null,
    "closed?": true,
    "repo_url": null,
    "repo_uuid": "intra-uuid-e595b115-a857-4ea9-bc02-fde6947e9480-34",
    "locked_at": "2017-03-06T14:59:11.442Z",
    "closed_at": "2017-03-06T14:59:11.471Z",
    "project_session_id": 1
  },
  "feedbacks": []
}
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: {scale_id: "1", team_id: "34"}}
response = token.post("/v2/scale_teams", params: params)
response.status
# => 201
response.parsed
# => {"id"=>11, "scale_id"=>1, "comment"=>nil, "created_at"=>"2017-03-06T15:20:33.486Z", "updated_at"=>"2017-03-06T15:20:33.486Z", "feedback"=>nil, "feedback_rating"=>nil, "final_mark"=>nil, "flag"=>{"id"=>1, "name"=>"Ok", "positive"=>true, "icon"=>"check-4", "created_at"=>"2017-03-06T14:58:45.166Z", "updated_at"=>"2017-03-06T14:58:45.166Z"}, "begin_at"=>nil, "correcteds"=>[{"id"=>66, "login"=>"jbinks2", "url"=>"https://api.intra.42.fr/v2/users/jbinks2"}], "corrector"=>{}, "truant"=>{}, "scale"=>{"id"=>1, "evaluation_id"=>1, "name"=>"South Carolina vixens", "is_primary"=>true, "comment"=>"Rem dolor green juice. Et hammock taxidermy farm-to-table placeat bushwick tattooed. Ea sit celiac trust fund photo booth. Soluta aut iusto locavore aut tilde.", "introduction_md"=>"Synth enim twee vitae chillwave ut. Helvetica corporis pbr&b excepturi keytar quae inventore. Rem dolores et est numquam seitan qui.", "disclaimer_md"=>"Mlkshk illo lo-fi. Distillery vinyl actually literally meh franzen. Organic heirloom laudantium pbr&b venmo. Five dollar toast vinegar dolores farm-to-table.", "guidelines_md"=>"Et saepe aut doloribus farm-to-table aut selfies laboriosam. Quo quisquam corporis fugiat est migas.", "created_at"=>"2017-03-06T14:59:05.553Z", "correction_number"=>3, "duration"=>1800, "manual_subscription"=>true, "languages"=>[{"id"=>2, "name"=>"English", "identifier"=>"en", "created_at"=>"2017-03-06T14:58:43.172Z", "updated_at"=>"2017-03-06T14:58:43.172Z"}]}, "team"=>{"id"=>34, "name"=>"cdooku's group", "url"=>"https://api.intra.42.fr/v2/teams/34", "final_mark"=>nil, "project_id"=>1, "created_at"=>"2017-03-06T14:59:11.365Z", "updated_at"=>"2017-03-06T15:20:33.491Z", "status"=>"waiting_for_correction", "terminating_at"=>nil, "users"=>[{"id"=>66, "login"=>"jbinks2", "url"=>"https://api.intra.42.fr/v2/users/jbinks2", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>34}], "locked?"=>true, "validated?"=>nil, "closed?"=>true, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-e595b115-a857-4ea9-bc02-fde6947e9480-34", "locked_at"=>"2017-03-06T14:59:11.442Z", "closed_at"=>"2017-03-06T14:59:11.471Z", "project_session_id"=>1}, "feedbacks"=>[]}