How to remove or deactivate Analysis with ret api?

Hi team,
I tried to automate some analysis creation/deactivation/deletion as non master operator. I’m able to create Analysis with multiple properties, and activate them on the fly with rest api call.

But when I tried to deactivate or remove the Analysis with rest api, I’ve got a 200 return code but nothing is done on Bigfix side. I mean the Analysis is still “Activated Locally”
URL examples :
https://gmorillo1:52311/api/analysis/operator/ILMTrestapit/776/activations
https://gmorillo1:52311/api/analysis/operator/ILMTrestapit/776
none of them are successfully doing what they have to do following rest api documentation : https://developer.bigfix.com/rest-api/api/analysis.html
Bigfix server version is 11.0.2.
Can you please help me to deactivate and remove analysis with rest api ?

This is how an analysis can be globally activated & deactivated. I made an analysis using an NMO account, and it shows “Activated Locally” here.

Post changes:
Activated Globally:

Deactivated:

Steps:

  • Login to IEM CLI as MO
  • Download analysis xml
    command: iem.exe get analysis/custom/my%20test/7898 > 7898.xml
  • Post downloaded xml
    command: iem.exe post 7898.xml analysis/custom/my%20test/7898/activations
  • To Deactivate 1st we need to get the ID of its activation
    command: iem.exe get analysis/custom/my%20test/7898/activations
  • Deactivation
    Command: iem.exe delete analysis/custom/my%20test/7898/activation/7900

And to DELETE:
iem.exe delete analysis/custom/my%20test/7898

Hi Vijay,
I agree deleting analysis is working on custom site, but not on operator site (my own operator site).
I will workaround my development by using custom site.
Thanks for your answer.
Guillaume

1 Like

Hi Vijay,
I come back to you with another questions about Analysis.
Is there a way to share results from NMO analyses with other NMO without Activate it by MO ?
My concern is the rest api user who creates analysis is not the same user as the one who will check results of my analysis. How to share results from Analyses between NMOs ?
I’m a little bit confuse because it’s the first time I work on Bigfix platform without MO rights.
Thanks to handle.
Guillaume

Hi Morillo, There is no default way to exchange the results with other NMOs if they are activated locally by a specific NMO operator.

However, NMO can still retrieve and store results via API queries.

I would consider creating a globally activated analysis (blank container) with the MO account in a custom site, for which the operators are having writer permissions.

Moving forward, if any operator creates or adds something to that analysis, it will be visible to all operators who have access to that site.

Many Thanks
I will share the options with my customer.