Difference between revisions of "API Upload Judging Score"
From zFairs Contest Management
(Created page with "== Upload Judging Scores == You can use our api to upload your judges scores. To do this you need to POST a message to your site. Below is an example of what needs to be poste...") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
headers:{'Content-Type': 'application/json'}, | headers:{'Content-Type': 'application/json'}, | ||
body: JSON.stringify({ | body: JSON.stringify({ | ||
− | + | ApiKey:'<Private key>', | |
− | |||
FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f | FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f | ||
Body: { | Body: { | ||
Line 16: | Line 15: | ||
ProjectKey: 'e381c719-d7fc-471a-b50c-fe51747652e4', | ProjectKey: 'e381c719-d7fc-471a-b50c-fe51747652e4', | ||
JudgeId: '674907d1-60db-443b-b3c9-4755564c94a9', | JudgeId: '674907d1-60db-443b-b3c9-4755564c94a9', | ||
− | Score: 98.2 | + | Score: 98.2, |
+ | Notes: 'Your project was great!', //optional | ||
}, | }, | ||
+ | ClearOldScores: true, //(true or false) Optional, default is true | ||
... | ... | ||
] | ] | ||
Line 30: | Line 31: | ||
* Note that all scores in this round will be cleared, prior to setting these new assignments. | * Note that all scores in this round will be cleared, prior to setting these new assignments. | ||
+ | |||
+ | |||
+ | |||
+ | <br/><br/><br/><br/> | ||
+ | [[Category: API]] |
Latest revision as of 20:58, 10 April 2024
Upload Judging Scores
You can use our api to upload your judges scores. To do this you need to POST a message to your site. Below is an example of what needs to be posted. You can get round Id from the get info api call, judge id, and project key are returned when a judge or project is added.
fetch('/api/data/JudgingScores', {
method:'POST',
headers:{'Content-Type': 'application/json'},
body: JSON.stringify({
ApiKey:'<Private key>',
FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f
Body: {
RoundId: 123,
Assignments:[{
ProjectKey: 'e381c719-d7fc-471a-b50c-fe51747652e4',
JudgeId: '674907d1-60db-443b-b3c9-4755564c94a9',
Score: 98.2,
Notes: 'Your project was great!', //optional
},
ClearOldScores: true, //(true or false) Optional, default is true
...
]
}
})
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});
- Note that all scores in this round will be cleared, prior to setting these new assignments.