Display list of courses in xblock

You can get a list of all courses from the /api/courses/v1/courses/ API endpoint.

If you need a list of all courses a user is enrolled into, you could use /api/enrollment/v1/enrollment or /api/enrollment/v1/enrollments. See this thread for the differences between the two.