When I grab the details of a task via the API there is no reference to the section that it's under. On the webpage the task shows what project and sub-section it's under, in the API it just shows the "projects" data without the sub-section.
Is there an easy way to get the section? Or is this not yet implemented in the API?
Also is there a way of getting a list of tasks that are in a sub-section?
It is currently a hidden, undocumented field in the API. I'd currently say it's unlikely to change before becoming public, so if you're feeling adventurous, you can request "?opt_fields=projects.section.name" (for instance).
I'll stress again that this isn't yet officially supported and thus could change. I wouldn't recommend it for production just yet.
As for getting all the tasks in a section, that does not exist at all.