shu_sato Super Contributor.
Super Contributor.
421 views

(OO) Support Tip: How to purge data for executions of a specific flow

Since OO 10.51, it has been possible to purge flow execution data of a specific flow by calling the /executions REST API. For example, sending a DELETE http request like below to your Central purges flow execution data of the flow with UUID 79e6def8-435a-4238-8c92-b168d82f24ed which ended before 2018-08-29 6:38:39 360 UTC.

  /oo/rest/latest/executions?endedBefore=1535524719360&flowUuids=79e6def8-435a-4238-8c92-b168d82f24ed

Please note that the 'endedBefore' request parameter is mandatory and its value must be an epoch(unix) timestamp in milliseconds.
Also if you use get an epoch(unix) timestamp from the 'Library/Utility Operations/Date and Time/Get Epoch Time' operation in a Base CP, the operation returns a timestamp not in milliseconds but in seconds.

See the following manual for more details about the REST API.

https://docs.microfocus.com/itom/Operations_Orchestration:2018.05/Develop/Working_with_API/Purge_Execution_Step_Data

0 Likes
3 Replies
Allen_G Contributor.
Contributor.

Re: (OO) Support Tip: How to purge data for executions of a specific flow

Been trying to test this on a specific flow. 

I ran the flow a few times as a test then used its UUID as an input with the Time Now. It returns status 200 but nothing gets deleted. 

Please see sample: 

/oo/rest/v2/executions?

endedBefore=1549449424
&flowUuids=dc4b52b1-89e3-434d-b222-3b19b89e0fcf
&purgeItems=steps

Have you gotten this to work?

Thank you. 

Allen

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: (OO) Support Tip: How to purge data for executions of a specific flow

Hi,

Because you put &purgeItems=stesps  this deleted only the step data. If you want to delete everything do not include the &purgeItems part.

Hope this helps,

Vlad

0 Likes
Respected Contributor.. thisamu Respected Contributor..
Respected Contributor..

Re: (OO) Support Tip: How to purge data for executions of a specific flow

Hello,

The problem with this API is that if we use both purgeItems and flowUuids, the Response entity body is not accurate and we can't use a loop to purge until all is done.

If the request's parameters involve purging 1 execution, then:

  • if purgeItems is not specified, the second request returns 0 ( the first call has purged all datas)
  • if purgeItems is specified, then the second request (and all subsequent ones) still return 1 (Datas have been purged but execution summary remain).

So we can't loop until  Response entity body is 0 with those two parameters.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.