Skip to main content
Question

Removing workspaces from a repository after 30 days?

  • September 20, 2023
  • 2 replies
  • 22 views

kateaew
Contributor
Forum|alt.badge.img+6

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
  • 8394 replies
  • September 20, 2023

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+6
  • Author
  • Contributor
  • 1 reply
  • September 20, 2023

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!