How to check whether site is valid or not using RestAPI

Hello,

I’m kinda new to bigfix and relevance.

I’m Working on automation of bigfix, where I’m going to create Multiple Action Group using REST API. To create an MAG user is entering the name of sites from which relevant fixlets will be picked up and added into MAG as members.

So My question is How to check whether the site given by the user is valid ?
is there any way using relevance or api’s?
cause if the name of the site is incorrect then the response will be :

Query I’m using to get relevant fixlets (with wrong site name):-

(name of site of it, id of it, name of it) of relevant fixlets whose (name of site of it is “PCI DSS Checklist for” and exists content id of Default Action of it) of bes computer whose (id of it is …)

response is:-

<?xml version="1.0" encoding="UTF-8"?> 68.17ms Plural

Revert ASAP,
Thanks in advance!

You can check both via session relevance, and/or via the REST API.

For the REST API, please see the GET /api/sites option: https://developer.bigfix.com/rest-api/api/site.html. This will return a list of all the sites available on the given Root Server, including their names, display names, and URLs.

For Session Relevance, you could try something like the following, which will return True or False accordingly:

exists bes site whose (name of it as lowercase = "PCI DSS Checklist for" as lowercase)

1 Like

Thank you @Aram For fast reply. :grinning: