riiiight. Perhaps you could have been a little more specific?
A course image url is linked from moodle like this:
and has data like this:
and so on.
So from an external, unauthenticated source such as my nodejs app, or wordpress, or some random jsp page, how do I calculate that row? component represents all courses, not a specific one. filename is the unknown I'm looking for. contenthash isn't the hash of the course row or anything obvious like that. There's no web service that returns information about the course image.
context appears to be mdl_context where contextlevel is the magic number "50" (e.g. why is it 50? Is it always 50 on everybody's system? Who decided it was 50? Can I look that up?) and instanceid is the row number of the course (the only number I externally know). path is just some random fact (which also happens to always end in the row id of the same record...).