riiiight. Perhaps you could have been a little more specific?
A course image url is linked from moodle like this:
<img src="http://moodle27.site/pluginfile.php/21/course/overviewfiles/lFIn4.gif">
and has data like this:
id:43
contenthash: 99df96fb5fc92574f02aabf59f1f3479231843ea
pathnamehash: ce846b41cadf16800da867cfe89a9d781a573a07
context: 21
component: course
filearea: overviewfiles
itemid: 0
filepath: /
filename: lFIn4.gif
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...).