I’m building a process that can transfer baselines from one root to another and maintain the source fixlet links. I have a process that works well IF the source fixlet and baseline are in the same site.
…How do I tell the source site of the fixlet SourceID? I see the SourceSiteURL=“http://server:52311/cgi-bin/bfgather.exe/actionsite” in the BaselineComponent, but I don’t think that tells me where to query for the source fixlet.
Site ID’s are not consistent often from one deployment to the other so you will have a big difficulty knowing which site each is. The IDs are assigned by the deployment so the same external site could be 2 on one deployment and 25 on another
Each component pulled from existing content is uniquely identified by the SourceSiteURL, SourceID and ActionName. So you would need to specify the SourceSiteURL (the site that the content is from), the SourceID (fixlet ID), and ActionName (usually Action1). External sites will always have the same SourceSiteURL. The action site and custom sites will have different hostnames/ports in their URL for each deployment.
Doesn’t totally help me. Most of the SourceSiteURL’s listed are …/cgi-bin/bfgather.exe/actionsite which doesn’t help me at all (or don’t think so). I don’t see how that gives me a path to the source fixlet xml in any way.
Actually that actionsite URL should be the correct site URL for any piece of custom content you have. Internally all custom site content is associated with the actionsite because all fixlet IDs are unique across all opsites and custom sites. The trick will be that the SourceID will change across deployments, so you will need to search for the proper ID, which you can do using session relevance.
We considered using Resource as the link, but you would still have to do the same query to check for the content, and then construct the resource link. Since you can’t query for fixlets by name using the fixlet resource in REST API, you will have to use session relevance which can output the site URL and ID, but not the API resource URL. If you want to post your relevance, we can suggest if there is a better version of it.
OK, so then I guess this is the workflow. Once I query for the fixlet:
(item 0 of it as string,
item 1 of it as string)
of (
(if (exists Names of Sites of it | false)
then (concatenations "%0A" of (Names of Sites of it as string))
else ("<none>")),
(if (exists ID of it | false)
then (concatenations "%0A" of (ID of it as string))
else ("<none>")))
of bes fixlets
whose ((Name of it as string = "Software package 1") AND
(Baseline Flag of it = False))
…I use that result (pray there is only one) to match up the “Names of Sites” with what I find in:
https://server.dom:52311/api/sites
Grabbing the <GatherURL> value from the node where the <Name> site matches the results above, but also removing “https://server.dom:52311/api/site” from that value to get me the “custom/software”, “external/Enterprise%20Security”, “operator/userid” or something like that. That way I can get the full path of the xml
((if custom flag of it then url of bes site whose (master site flag of it) else url of site of it), id of it) of bes fixlets whose (name of it as string = "Software package 1" AND not baseline flag of it)