Deleting a pod from my local community solid server

Hello

Is it possible to delete a pod from an account on the Community Solid Server through their JSON API? I tried the following code but this returns a statuscode 500.

const podIdToDelete = '...'
    const podUrl = '.../${podIdToDelete}'
    res = await fetch(podUrl, {
        headers: {
            authorization: `CSS-Account-Token ${authorizationValue}`,
            'content-type': 'application/json'
        },
        method: 'DELETE'
    })
    data = await res.json()

    console.log(`Pod deleted: `, data)

Output:

Pod deleted:  {
  name: 'InternalServerError',
  message: 'Received unexpected non-HttpError: Unexpected end of JSON input',
  statusCode: 500,
  errorCode: 'H500',
  details: {}
}

Is it even possible to delete a pod from an account or do you need to delete the entire account?

I also noticed the webId linked to the pod can be deleted in the GUI on my localhost:3000. What would happen with the pod if I deleted the only webId linked to it?

Thanks in advance!

Neither you nor anyone else would be able to be authorized to use the pod.

Seems like it’s currently not possible: JSON API - Community Solid Server

If you want this feature, I’d suggest to ask in their github repository.

Ok thanks.

So does this mean that, currently, the only way you can delete a pod is by deleting your entire account or by removing the data related to that pod manually in the local .data directory?

That would appear to be the case. The maintainers in the github repo should be able to tell you more.

You can delete all the contents of a pod, and then remove it from your webID, but it doesn’t seem you can delete the pod itself right now.

Ok, maybe I will contact them but for the moment I can do it manually. Thanks for the info!