We are currently using the conclude option when we remove courses from our catalog now, and I am attempting to make a 'create_or_update' pattern so if we ever try to re-add a course to a catalog again, and transmit, we can change the course back from 'concluded' to 'offer' state (using the "course[event]" option here). Currently we simply fail the create operation, because we don't check if the course exists even if in deleted / concluded state... 😞
I am having trouble finding an api endpoint that can search for a course across all subaccounts regardless of the state it is in. Looks like I can only find under one account at a time. This means I have to loop over all subaccounts using this recursive option
{{canvas_url}}/api/v1/accounts/1/sub_accounts?per_page=100&recursive=true
😞 hopefully there is an easier way?
The reason I need to find under all subaccounts is that the course could have been added under a different subaccount or moved to a different subaccount and I would still need to be able to find it before I can decide if I need to create it or just update it.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.