Cog index
In this section, we talk about the /asgard
and /list_asgard
endpoints
/asgard
and /list_asgard
both do essentially the same thing. However, /list_asgard
is less verbose, and only provides the name of cogs as a
This endpoint exists to be able to check if a cog exists.
Some example responses
Lets look at some examples of the response sent to us back. In these examples, we assume that the user has a cog installed called "test".
/asgard
{ "code": 200, "data": { "test": { // This is a cog "name": "test", "source": { "test": "print('Hello from Python')\nreturn 2" } } }}
/list_asgard
{ "code": 200, "data": { "data": ["test"] // a list of all cogs } }
As you can see above, /list_asgard
only provides the bare minimum information. Hence this endpoint is used to check if a cog exists.