Skip to content

Instantly share code, notes, and snippets.

@pixelead0
Created July 11, 2022 17:49
Show Gist options
  • Save pixelead0/a11ed4e4f9e1e882e55413db12b3f444 to your computer and use it in GitHub Desktop.
Save pixelead0/a11ed4e4f9e1e882e55413db12b3f444 to your computer and use it in GitHub Desktop.
List all pads - etherpad
# List all pads - etherpad
# https://github-wiki-see.page/m/ether/etherpad-lite/wiki/How-to-list-all-pads
# https://etherpad.org/doc/latest/#index_http_api
ETHERPAD_HOST='http://127.0.0.1:9001'
# can be found in APIKEY.txt file in the Etherpad installation directory
ETHERPAD_API_KEY='...'
#Get api version
VERSION_URL="${ETHERPAD_HOST}/api/"
API_VERSION="`curl -s -X GET "${VERSION_URL}" | jq -r '.currentVersion'`"
PADS='listAllPads'
LIST_PADS_URL="${ETHERPAD_HOST}/api/${API_VERSION}/${LIST_PADS}/?apikey=${ETHERPAD_API_KEY}"
curl -s -X GET "${LIST_PADS_URL}" | jq -r '.data.padIDs[]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment