Hi Srihari Yenamandra and welcome to the Canvas Community! I don't work with Java and APIs much, but am going to share this question with the Canvas Admins and Canvas Developers groups to increase its visibility and in hopes that someone can provide useful insight. If you have not already done so, you might consider joining these user groups as well.

Thank you for your response! I was looking under list-users-in-course, and I couldn't seem to find any mentions of sections under that part of it, but I'm not sure how I would go about implementing it anyways. Also, I'm having trouble understanding how to test using the live API. Sorry for the very basic questions, but I'm very new to this. Thank you for your help!

When you go to the live api web page at the top of the screen you will need to entered in your authentication token

Once you have entered in your authentication token and clicked the Save token button you will want to scroll down until you see the enrollment api section and click on the one shown in the screen shot below.

Once there scroll down and you will see where you can entered in the Canvas course SIS ID

Entered in the Canvas course SIS ID (you may have to go to the course and find it in the URL

Once you have entered in the course_id click try it out and you will see the json results you would receive back if you called it via code.

I have found using the live api page very useful in testing out Canvas's API's and ensuring I am going to be calling the correct one prior to putting any development time.

You can probably approach this one of two ways, depending on how you will apply the data. The easiest way I could see would be to run a canned provisioning report from Canvas for enrollments. This should list the students, instructors, TAs, etc. in a given course and term, and from there you can filter the CSV for the section you want. You can do this by going to the Admin Sheild => Settings => Reports => Provisioning => Enrollments => Filter by term => Export.

However, to approach this programatically (full disclosure I am not a coder so this may be a primitive approach), would be to first get the sections for a course (assuming you already had the course IDs handy) with:

api/v1/courses/course_id/sections

Then, using the json response, and section ID from that call, make the next call for enrollments by section with:

api/v1/section/section_id/enrollments

As Brian Neporadny mentioned above, you will definitely want to check out the documentation as there are different parameters and calls you can make to get the specific information you need.