Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete a pad when you can't use the admin interface #6302

Closed
nono-lqdn opened this issue Apr 3, 2024 · 1 comment
Closed

How to delete a pad when you can't use the admin interface #6302

nono-lqdn opened this issue Apr 3, 2024 · 1 comment

Comments

@nono-lqdn
Copy link

Describe the bug

Because of several limitations of the admin interface of etherpad, you may encounter a situation where you have too many pads to delete or edit them through the admin interface, using the ep_adminpads_2 plugin, because the query times out with the Error: Query inactivity timeout error message.

See : ether/ep_adminpads2#25

Because of that, you may need to delete the pad via the API. Here are the steps you should follow.

Please not that if you don't know the pad's ID ( which is everything after the /p/ part of the URL, i.e; pad.example.com/p/this-is-the-pad-id ), you will have the visit each pad. Good luck with that.

To Reproduce
Steps to reproduce the behavior:

  1. Find your Etherpad's API Key. It should be in the API_KEY.txt file in your etherpad installation.
  2. Find you Etherpad's API version. It should be display when you visit the pad.example.org/api/ page.
  3. Optional - Connect to your server and run the follow command to get your pad's ID if needed : mysql etherpad -e "select \key` from store where `key` like 'pad:%' and `key` not like '%:%:%';" | grep "a word I know is in the pad's URL"`
    3.1. You can know run the following command :
ETHERPAD_HOST='https://pad.example.ch'; ETHERPAD_API_KEY='your-API-key'; ETHERPAD_API_VERSION='your-api-version'; curl -s -X GET "${ETHERPAD_HOST}/api/${ETHERPAD_API_VERSION}/deletePad?apikey=${ETHERPAD_API_KEY}&padID=your-pad-id"

You need to replace the values of ETHERPAD_HOST , ETHERPAD_API_KEY, ETHERPAD_API_VERSION, and padID

You should get this answer :

{"code":0,"message":"ok","data":null}% 

Also note that if your pad's ID contains non-ascii characters ( for example é è ê or any similar character ), you will need to replace it by it's percent-encoded version .

The wiki may help you : https://etherpad.org/doc/v2.0.1/#_deletepadpadid

This can and maybe should be added to the wiki. It's more of a not for myself in the futur and anyone it might help.

@SamTV12345
Copy link
Member

Try updating to Etherpad 2.1. That issue should be solved with 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants