I've been getting into using the webservices API and enjoying the features I can use
I have successfully used GetServiceByName to return a service and then used the output of that in GetElementsForService to get an array of the elements associated with the service.
I am trawling through the methods trying to find one where I can add or remove elements for a service but cannot find what I am looking for.
Additionally I am trying to find the Visio File Name associated to a service but the GetServiceByName only has a Boolean of HasVisio but not the filename, and any of the GetVisioXXX functions seem to just output a PNG and not advise of the filename of the Visio.
I was delighted though to find AssignVisioFileToService
My question is there any way to modify the element service associations (ie: remove elements from one service and add them to another service) and get the filename of a visio assigned to a service through the Web Services API?
There is no endpoint scoped to changing the elements on a service, but there is the EditService you can use to modify all associations in one go. Together with GetFullService you should have enough to fetch and stitch together the new state of your service.
I don't think you can request the visio file name that is assigned to a service, you can only get the entire list of file names.
thank you Gilles!!!
Diving into the EditService I discovered GetServiceConfiguration is more useful then GetFullService as GetServiceConfiguriation returns DMAServiceConfiguration which is the type that EditService expects to see.
Managed to achieve exactly what I was after now with that: https://docs.dataminer.services/develop/webservices/WS_v1/WS_Methods_v1/GetServiceConfiguration.html
(With the exception of not being able to read the filename of the Visio file which I'm just doing that bit manually instead of the scripting)