Finding IDs and problems with {account_id}.

dhagood
Community Novice

Most API calls require some an ID. I find ID variables by making a general call (GET /api/v1/courses) that includes an ID variable, then use one of the specific IDs for further calls (this example returns {course_id} values). I've noticed that some of the IDs are displayed in the URL as well, if I access the content in the browser.

But for a some IDs, I am not sure where to find the information.

Where can I find the {account_id} value? Is that what is returned when I call GET /api/v1/accounts/search? If yes, I'm not sure how to tell account_id is related to a specific course. I'm trying calls that require the {account_id} and not getting back data. Are calls using the {account_id} generally above the TA / Instructor privileges level?

Then, in some instances a call references just {id}. For example, with GET /api/v1/courses/{id}, I would expect {id} to reference a {course_id} value. Is this correct? Is an {id} value short hand for the identifier likely related to the call? For example, in this example, I am confused why the call references {id} when there is also a {course_id} used in the API—like in requests like GET /api/v1/courses/{course_id}/students.