-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
@jmiranda Given our conversation about requesting api calls for reporting, here's the first request:
Given a call with course_id as a parameter I should get the total number of annotations:
{
course_id: fake_course_id, // to validate once returned
total_anno_num: 1500, // # of annotations WHERE course_id = fake_course_id
collections: [{
collection_id: fake_collection_id1,
total_anno_num: 300, // # of annotations WHERE collection_id=fake_collection_id1 AND course_id=fake_course_id
objects: [{
object_id: object_id1
total_anno_num: 25, // # of annotations WHERE course_id=fake_course_id AND collection_id=fake_collection_id1 AND object_id=object_id1
}, {
...
}]
}, {
...
}]
}
Ideally making this one call would be best, though if in the meantime there's one call where I send a request per item that I want, that would be fine too.
i.e.
/catch/annotator/report_totals?course_id=fake_course_id //returns 1500
/catch/annotator/report_totals?course_id=fake_course_id&collection_id=fake_collection_id1 // returns 300
/catch/annotator/report_totals?course_id=fake_course_id&collection_id=fake_collection_id1&object_id=object_id1 //returns 25
The question is what does catch handle better? One call where I ask for everything or several calls where I ask for each part individually.
Metadata
Metadata
Assignees
Labels
No labels