Working with the etherpad API

We have a local etherpad running on the soupboat! We have access to the "APIKEY" (basically just a single password for all users to share that gives access to the API, or Application Programming Interface. This API is available "over HTTP" or as a "REST service" ... basically this means that the API is functions that you call via loading specific URLs)

Using the etherpad HTTP api:
https://etherpad.org/doc/v1.8.4/#index_http_api

The pad API is here:

Via this URL you can see what version of the API the pad supports...

https://hub.xpub.nl/soupboat/pad/api/

the version then goes into the URL:

https://hub.xpub.nl/soupboat/pad/api/1.2.15/listAllPads

aha, but you need to include the API KEY! (this is what prevents people from spamming your pad)

https://hub.xpub.nl/soupboat/pad/api/1.2.15/listAllPads?apikey=1234567

but that's not the good one, let's let python make a good URL:

It's important this APIKEY is never made public, if it's published then anyone has access to the API, and can (for instance) write a script to delete all pads, or (perhaps more likely) create random pads with links (how search engines are manipulated). For this reason, it's not advisable (though it's technically possible) to call the API directly from javascript) ... Need to think of a workaround.

A really useful API call is appendText, that let's you add text to the end of an (already existing) pad.

https://etherpad.org/doc/v1.8.4/#index_appendtext_padid_text

https://hub.xpub.nl/soupboat/pad/p/test