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": [
    {
      "begin_at": "2017-11-27 09:00:00 UTC",
      "scale_id": "1",
      "team_id": "68"
    }
  ]
}
201
[
  {
    "id": 4,
    "scale_id": 1,
    "comment": null,
    "created_at": "2017-11-22T13:44:01.678Z",
    "updated_at": "2017-11-22T13:44:01.678Z",
    "feedback": null,
    "feedback_rating": null,
    "final_mark": null,
    "flag": {
      "id": 1,
      "name": "Ok",
      "positive": true,
      "icon": "check-4",
      "created_at": "2017-11-22T13:41:01.837Z",
      "updated_at": "2017-11-22T13:41:01.837Z"
    },
    "begin_at": "2017-11-27T09:00:00.000Z",
    "correcteds": [
      {
        "id": 125,
        "login": "sebulseb",
        "url": "https://api.intra.42.fr/v2/users/sebulseb"
      }
    ],
    "corrector": {},
    "truant": {},
    "filled_at": null,
    "scale": {
      "id": 1,
      "evaluation_id": 1,
      "name": "Utah ducks",
      "is_primary": true,
      "comment": "Perferendis maiores dreamcatcher. Pickled five dollar toast truffaut quis fashion axe.",
      "introduction_md": "Direct trade asperiores aut odit. Eius meh qui nihil reprehenderit. Before they sold out vegan molestias. Brooklyn rerum non architecto mumblecore franzen post-ironic.",
      "disclaimer_md": "Ipsa expedita gluten-free. Laboriosam ennui actually literally aut trust fund.",
      "guidelines_md": "Tumblr ethical eaque blanditiis eligendi. Dolores facere maiores hashtag pour-over architecto.",
      "created_at": "2017-11-22T13:41:27.388Z",
      "correction_number": 3,
      "duration": 1800,
      "manual_subscription": true,
      "languages": [
        {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-11-22T13:40:59.468Z",
          "updated_at": "2017-11-22T13:41:26.139Z"
        }
      ]
    },
    "team": {
      "id": 68,
      "name": "sebulseb's group",
      "url": "https://api.intra.42.fr/v2/teams/68",
      "final_mark": null,
      "project_id": 1,
      "created_at": "2017-11-22T13:41:37.418Z",
      "updated_at": "2017-11-22T13:44:01.687Z",
      "status": "waiting_for_correction",
      "terminating_at": null,
      "users": [
        {
          "id": 125,
          "login": "sebulseb",
          "url": "https://api.intra.42.fr/v2/users/sebulseb",
          "leader": true,
          "occurrence": 0,
          "validated": true,
          "projects_user_id": 68
        }
      ],
      "locked?": true,
      "validated?": null,
      "closed?": true,
      "repo_url": null,
      "repo_uuid": "intra-uuid-5af5ca8d-e0dc-4791-9cfc-ed657e1984e0-68",
      "locked_at": "2017-11-22T13:41:37.471Z",
      "closed_at": "2017-11-22T13:41:37.496Z",
      "project_session_id": 1
    },
    "feedbacks": []
  }
]
curl  -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"scale_teams":[{"begin_at":"2017-11-27 09:00:00 UTC","scale_id":"1","team_id":"68"}]}' "https://api.intra.42.fr/v2/scale_teams/multiple_create"

[
  {
    "id": 4,
    "scale_id": 1,
    "comment": null,
    "created_at": "2017-11-22T13:44:01.678Z",
    "updated_at": "2017-11-22T13:44:01.678Z",
    "feedback": null,
    "feedback_rating": null,
    "final_mark": null,
    "flag": {
      "id": 1,
      "name": "Ok",
      "positive": true,
      "icon": "check-4",
      "created_at": "2017-11-22T13:41:01.837Z",
      "updated_at": "2017-11-22T13:41:01.837Z"
    },
    "begin_at": "2017-11-27T09:00:00.000Z",
    "correcteds": [
      {
        "id": 125,
        "login": "sebulseb",
        "url": "https://api.intra.42.fr/v2/users/sebulseb"
      }
    ],
    "corrector": {},
    "truant": {},
    "filled_at": null,
    "scale": {
      "id": 1,
      "evaluation_id": 1,
      "name": "Utah ducks",
      "is_primary": true,
      "comment": "Perferendis maiores dreamcatcher. Pickled five dollar toast truffaut quis fashion axe.",
      "introduction_md": "Direct trade asperiores aut odit. Eius meh qui nihil reprehenderit. Before they sold out vegan molestias. Brooklyn rerum non architecto mumblecore franzen post-ironic.",
      "disclaimer_md": "Ipsa expedita gluten-free. Laboriosam ennui actually literally aut trust fund.",
      "guidelines_md": "Tumblr ethical eaque blanditiis eligendi. Dolores facere maiores hashtag pour-over architecto.",
      "created_at": "2017-11-22T13:41:27.388Z",
      "correction_number": 3,
      "duration": 1800,
      "manual_subscription": true,
      "languages": [
        {
          "id": 3,
          "name": "Romanian",
          "identifier": "ro",
          "created_at": "2017-11-22T13:40:59.468Z",
          "updated_at": "2017-11-22T13:41:26.139Z"
        }
      ]
    },
    "team": {
      "id": 68,
      "name": "sebulseb's group",
      "url": "https://api.intra.42.fr/v2/teams/68",
      "final_mark": null,
      "project_id": 1,
      "created_at": "2017-11-22T13:41:37.418Z",
      "updated_at": "2017-11-22T13:44:01.687Z",
      "status": "waiting_for_correction",
      "terminating_at": null,
      "users": [
        {
          "id": 125,
          "login": "sebulseb",
          "url": "https://api.intra.42.fr/v2/users/sebulseb",
          "leader": true,
          "occurrence": 0,
          "validated": true,
          "projects_user_id": 68
        }
      ],
      "locked?": true,
      "validated?": null,
      "closed?": true,
      "repo_url": null,
      "repo_uuid": "intra-uuid-5af5ca8d-e0dc-4791-9cfc-ed657e1984e0-68",
      "locked_at": "2017-11-22T13:41:37.471Z",
      "closed_at": "2017-11-22T13:41:37.496Z",
      "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: [{begin_at: "2017-11-27 09:00:00 UTC", scale_id: "1", team_id: "68"}]}
response = token.post("/v2/scale_teams/multiple_create", params: params)
response.status
# => 201
response.parsed
# => [{"id"=>4, "scale_id"=>1, "comment"=>nil, "created_at"=>"2017-11-22T13:44:01.678Z", "updated_at"=>"2017-11-22T13:44:01.678Z", "feedback"=>nil, "feedback_rating"=>nil, "final_mark"=>nil, "flag"=>{"id"=>1, "name"=>"Ok", "positive"=>true, "icon"=>"check-4", "created_at"=>"2017-11-22T13:41:01.837Z", "updated_at"=>"2017-11-22T13:41:01.837Z"}, "begin_at"=>"2017-11-27T09:00:00.000Z", "correcteds"=>[{"id"=>125, "login"=>"sebulseb", "url"=>"https://api.intra.42.fr/v2/users/sebulseb"}], "corrector"=>{}, "truant"=>{}, "filled_at"=>nil, "scale"=>{"id"=>1, "evaluation_id"=>1, "name"=>"Utah ducks", "is_primary"=>true, "comment"=>"Perferendis maiores dreamcatcher. Pickled five dollar toast truffaut quis fashion axe.", "introduction_md"=>"Direct trade asperiores aut odit. Eius meh qui nihil reprehenderit. Before they sold out vegan molestias. Brooklyn rerum non architecto mumblecore franzen post-ironic.", "disclaimer_md"=>"Ipsa expedita gluten-free. Laboriosam ennui actually literally aut trust fund.", "guidelines_md"=>"Tumblr ethical eaque blanditiis eligendi. Dolores facere maiores hashtag pour-over architecto.", "created_at"=>"2017-11-22T13:41:27.388Z", "correction_number"=>3, "duration"=>1800, "manual_subscription"=>true, "languages"=>[{"id"=>3, "name"=>"Romanian", "identifier"=>"ro", "created_at"=>"2017-11-22T13:40:59.468Z", "updated_at"=>"2017-11-22T13:41:26.139Z"}]}, "team"=>{"id"=>68, "name"=>"sebulseb's group", "url"=>"https://api.intra.42.fr/v2/teams/68", "final_mark"=>nil, "project_id"=>1, "created_at"=>"2017-11-22T13:41:37.418Z", "updated_at"=>"2017-11-22T13:44:01.687Z", "status"=>"waiting_for_correction", "terminating_at"=>nil, "users"=>[{"id"=>125, "login"=>"sebulseb", "url"=>"https://api.intra.42.fr/v2/users/sebulseb", "leader"=>true, "occurrence"=>0, "validated"=>true, "projects_user_id"=>68}], "locked?"=>true, "validated?"=>nil, "closed?"=>true, "repo_url"=>nil, "repo_uuid"=>"intra-uuid-5af5ca8d-e0dc-4791-9cfc-ed657e1984e0-68", "locked_at"=>"2017-11-22T13:41:37.471Z", "closed_at"=>"2017-11-22T13:41:37.496Z", "project_session_id"=>1}, "feedbacks"=>[]}]