Skip to main content
Question

Removing workspaces from a repository after 30 days?

  • Sep 20, 2023 3:20 PM UTC
  • 2 replies
  • 64 views

kateaew
Contributor
Forum|alt.badge.img+11

We have an 'Archived' repository on FME Flow. I was wondering if there was a way to create a workbench or an automation to, for example, delete a workspace after it has been sat in Archived for 30 days.

 

Thanks

2 replies

david_r
Celebrity
  • Sep 20, 2023 3:41 PM UTC

You can list the contents of the Archived repository using the REST API endpoint:

GET  /repositories/Archived/items

And then this endpoint to retrieve detailed information about each workspace:

GET /repositories/Archived/items/<item>

Perhaps look at the attribute "workspace.lastPublishDate" or something to that effect.

Then delete a workspace using:

DELETE /repositories/Archived/items/<item>

 You can use an HTTPCaller with a web connection to your FME Flow instance for authentication.

Complete API documentation here: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html


kateaew
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • Sep 20, 2023 3:48 PM UTC

You can list the contents of the Archived repository using the REST API endpoint:

GET  /repositories/Archived/items

And then this endpoint to retrieve detailed information about each workspace:

GET /repositories/Archived/items/<item>

Perhaps look at the attribute "workspace.lastPublishDate" or something to that effect.

Then delete a workspace using:

DELETE /repositories/Archived/items/<item>

 You can use an HTTPCaller with a web connection to your FME Flow instance for authentication.

Complete API documentation here: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html

Thank you!