Forum Discussion

richarc's avatar
richarc
New Contributor
3 years ago

Set Primary Location via API

I am trying to add a list of monitors using the API, I have all the necessary JSON field names, but I am getting an error that the "Primary location X is not in the listed locations home_location".  I have set home_location to the id of our private node servers using both the text and number. Also The error "Primary location X, the X is not the correct number of the location when getting the location via API, I didn't know if the X is an error.  Just a note I did try the location that was shown in the error, but still get the error. I can click in the GUI on the private node and set the primary location ok, just not via the API. 

I just need to know if this can be done via API, what is the correct JSON field name and what location number I should use or is the only choice that will I have to click through my list of sites after the monitors are created. 

 

Also I could be overlooking this, but what is the JSON field name used to set up alert recipient groups? If this can't be done via API is there a way to set it for a group of monitors all at once?

 

Thanks for your help

 

 

 
 
 
No RepliesBe the first to reply