Pods automatic Creation

Hello, I am new to Solid, and I want to create a script that automates creation/deletion of the pods inside a Community Solid Server machines.

Welcome :slight_smile:

You can create accounts with the JSON api by making a POST request to /idp/register: Identity provider - Community Solid Server.
For example, here’s the script I’ve used for automated testing: solid-client-credentials-py/css_utils.py at 3561923de61b1c4bba7a7100e93be87bbca83b7c · Otto-AA/solid-client-credentials-py · GitHub

For deletion, I think it’s not possible yet. I’ve found this related issue: Deleting user account from web interface · Issue #1132 · CommunitySolidServer/CommunitySolidServer · GitHub

Thanks for the reply and your answer!

I think this solution would require creating new account whenever creating a new pod?

Is there a way to create multiple pods on the server with the same webID, or create the webIDs first, then assign/create pods using those account (identified by their webIDs)?

Thanks a lot for your kind reply!

Best,
Ragab

Hi Ragab

Yes, it does. It looks like currently CSS requires a 1 webid ↔ 1 pod relationship and does not support multiple pods per webId (Pod management authentication · Issue #972 · CommunitySolidServer/CommunitySolidServer · GitHub).

However, if you want to invest more time, you could achieve a nearly identical behaviour by creating n pods and n webIds, and afterwards changing the permissions such that one webId has Read+Write+Control permissions to all pods. So essentially, this one webId controls all the pods even though it didn’t create them. The steps would be:

  1. Create 1 pod with webId MyWebId.
  2. Create n other pods and store their usernames and passwords
  3. For each of the other pods:
    4.1 Authenticate this pod (e.g. via client credentials)
    4.2 Go through all revelant files and folders in this pod
    4.3 Give MyWebId Read,Write,Control permissions to these files, folders and contents of folders
  4. Use MyWebId with all the pods, ignore the other web ids

And a general tip: If you ask a question on multiple platforms it can be helpful for others if you link them, so they know what’s already been said and also future readers could look for further info there (Here’s the corresponding github issue to this thread: Automatic Creation of pods in CSS · Issue #1585 · CommunitySolidServer/CommunitySolidServer · GitHub)

1 Like