0

I'm setting up Backstage for local development, and I would like the ability to "preseed" the catalog with various configurations of entities. Backstage already preseeds the catalog with some of its own entities, and I'd like to remove them so that the developer experience is cleaner.

However, I can't find how to delete entities via API. By capturing network logs from the website, it appears that a deletion consists of two requests, both to /api/catalog/entities/by-uid/<uid>:

  • an OPTIONS request with a Access-Control-Request-Method: DELETE header
  • a DELETE request

However, when I try to make these calls myself - even going so far as to "copy as cURL" and change uids, to ensure headers are matching - the target entity remains.

scubbo
  • 4,969
  • 7
  • 40
  • 71

1 Answers1

0

I have made this work for me with

curl -X DELETE http://localhost:7007/api/catalog/entities/by-uid/<UID>

It might be that the entity you are trying to delete is registered with a location that still exists, so even if you delete it will pop back up again. Have a look at the docs here: https://backstage.io/docs/features/software-catalog/life-of-an-entity/#explicit-deletion

I hope this helps!

Jette
  • 1