Found this content helpful? Log in or sign up to leave a like!

Accounts API Courses endpoint not filtering on Account Id

Jump to solution
nbpenn
Community Member

Hi - not sure if this forum deals with bug reports, if not please let me know where to file this (or, maybe it's not a bug?)

When I retrieve Courses from an Account, I would assume that the response would only contain Courses with the same Account Id, but I'm seeing requests to:

https://[my site].instructure.com/api/v1/accounts/[account-id-1234]/courses

Response:

...
{
    "id": [course id],
    "name": "[course name]",
    "account_id": [account-id-6789],
...
},

 

Is this by design? Is it pulling the courses by the root_account_id?

Labels (4)
0 Likes
1 Solution
melodyc_lam
Community Coach
Community Coach

@nbpenn That call should return courses that belong to that account and any associated subaccounts. The call result should match the UI Courses page when you access an account. Hope that helps!

View solution in original post

0 Likes