Analysis GET/Update Rest API

I am trying to get all analysis from master action site which are set for every report & want to update them for some defined time.

But when I am trying to use GET in IEM CLI -
iem get --server=https://localhost:52311/api/analysis/master/master >>out.xml
API Request Failed: String found where a integer ID expected.

However when I am going by ID its fetching data.

once xml is available with all analysis which are set for every report, I want to change them & update using REST API

please suggest.

Hello vk.khurava,

Please try the following queries:

iem login
iem get api/analyses/master

Regards,
Vitaliy

1 Like

Thanks Vitaliy ! earlier I thought there is some typo in analyses but after test came to know :slight_smile:

But its not giving me the complete info, like its showing only name, ID, there is no period info like its set for every report for anything else.

I want to edit that info & than push back updated xml.

1 Like

Hello vk.khurava,

Please look at the following page for REST API Analyses:
https://developer.bigfix.com/rest-api/api/analysis.html

The query GET analyses/{site type}/{site name} fetches a list of analyses in the specified site.
It’s response is XML list of Analyses (including Analyses IDs).

The query GET analysis/{site type}/{site name}/{analysis id} gets the XML for a specific analysis.
It’s response is BES XML of Object.

You may use POST to create new content and PUT to update it.

Regards,
Vitaliy