PATCH /v2/teams_uploads/:id
Update a teams upload
PUT /v2/teams_uploads/:id
Update a teams upload
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 |
teams_upload | optional , nil allowed . Must be a Hash |
teams_upload[team_id] |
optional
. Must be Fixnum
The team id. Must be unique in the scope of a given upload. |
teams_upload[upload_id] |
optional
. Must be Fixnum
The upload id. |
teams_upload[final_mark] |
optional
, nil allowed
. Must be Fixnum
The final mark. |
teams_upload[comment] |
optional
, nil allowed
. Must be String
The comment. |
Examples
PUT /v2/teams_uploads/1
{
"teams_upload": {
"comment": "The Other Side of Silence",
"final_mark": "42",
"team_id": "18",
"upload_id": "1"
}
}
204
curl -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"teams_upload":{"comment":"The Other Side of Silence","final_mark":"42","team_id":"18","upload_id":"1"}}' "https://api.intra.42.fr/v2/teams_uploads/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 = {teams_upload: {comment: "The Other Side of Silence", final_mark: "42", team_id: "18", upload_id: "1"}}
response = token.put("/v2/teams_uploads/1", params: params)
response.status
# => 204
response.parsed
# =>