This calls allow the creation of multiple scale_teams in a single call. To be more comfortable, and for readability, we recommend that you send the data as an array of JSON objects.

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
scale_teams optional , nil allowed . Must be an Array of nested elements
comments powered by <span class='logo-disqus'>Disqus</span>
POST /v2/scale_teams/multiple_create
{
  "scale_teams": [
    {
      "scale_id": "1",
      "team_id": "34"
    }
  ]
}
201
[
  {
    "id": 13,
    "scale_id": 1,
    "comment": null,
    "created_at": "2017-03-06T15:20:33.911Z",
    "updated_at": "2017-03-06T15:20:33.911Z",
    "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.919Z",
      "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_teams":[{"scale_id":"1","team_id":"34"}]}' "https://api.intra.42.fr/v2/scale_teams/multiple_create"

[
  {
    "id": 13,
    "scale_id": 1,
    "comment": null,
    "created_at": "2017-03-06T15:20:33.911Z",
    "updated_at": "2017-03-06T15:20:33.911Z",
    "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.919Z",
      "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_teams: [{scale_id: "1", team_id: "34"}]}
response = token.post("/v2/scale_teams/multiple_create", params: params)
response.status
# => 201
response.parsed
# => [{"id"=>13, "scale_id"=>1, "comment"=>nil, "created_at"=>"2017-03-06T15:20:33.911Z", "updated_at"=>"2017-03-06T15:20:33.911Z", "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.919Z", "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"=>[]}]