This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

API/SDK for a REST call to update Component settings

Is there a way using the SWQL REST calls to update the Component Settings for a Application monitor assigned to a node?

Example:

I have a Node and I have created an Application Monitor for HTTP.  The URL and proxy settings need to be updated for the Node, however, I would like to do this via an API/SDK.  The GUI interface is not an option.

Parents
  • For anyone else that comes across this thread, this is now possible to do. For a bit more information, check out Dan's answer to my questions at the bottom of this thread.

    Here is an example of modifying the Url field of an HTTPS component monitor using the REST API.

    Override a component setting:

    POST to https://orionserver:17778/SolarWinds/InformationService/v3/Json/Create/Orion.APM.ComponentSetting with a JSON payload that looks like this:

    {"Key":"Url","Value":"YourCustomValue","ValueType":0,"Required":true,"ComponentID":YourComponentID}

    Edit an component setting that is already overridden:

    POST to https://orionserver:17778/SolarWinds/InformationService/v3/Json/swis://orionserver/Orion/Orion.APM.ComponentSetting/ComponentID=YourComponentID,Key="Url" with a JSON payload that looks like this:{"Value":"YourCustomValue"}

Reply
  • For anyone else that comes across this thread, this is now possible to do. For a bit more information, check out Dan's answer to my questions at the bottom of this thread.

    Here is an example of modifying the Url field of an HTTPS component monitor using the REST API.

    Override a component setting:

    POST to https://orionserver:17778/SolarWinds/InformationService/v3/Json/Create/Orion.APM.ComponentSetting with a JSON payload that looks like this:

    {"Key":"Url","Value":"YourCustomValue","ValueType":0,"Required":true,"ComponentID":YourComponentID}

    Edit an component setting that is already overridden:

    POST to https://orionserver:17778/SolarWinds/InformationService/v3/Json/swis://orionserver/Orion/Orion.APM.ComponentSetting/ComponentID=YourComponentID,Key="Url" with a JSON payload that looks like this:{"Value":"YourCustomValue"}

Children
  • Hello , Any chance you still have a link to this thread? Every reference I've found to it is broken and I'm facing a similar need.

  • I am also not able to find that the thread I refer to in my previous post. I checked my profile and it doesn't come up in my post history, either. I believe the information I put in this thread is the gist of what you need to know to get going. I can try to answer any questions you may have about what I did.

  • Thanks, I was looking for that !

    It's not even in the swagger !

  • Thanks ,

    when I try any of both suggested commands on SAM 6.7.0, I receive an AccessDeniedException.

    Any idea what privs are needed? The user has full admin rights and a GET from these urls work well.

    URL: https://<orion_host>:17778/SolarWinds/InformationService/v3/Json/Create/Orion.APM.ComponentSetting

    JSON: {"Key":"DestinationPointName","Value":"REPCDCA","ValueType":0,"Required":true,"ComponentID":1737 }

    Error:

       "Message": "Operation not supported on Orion.APM.ComponentSetting",
    
        "ErrorCode": 20,
        "UserMessage": "Operation not supported on Orion.APM.ComponentSetting",
        "ExceptionType": "SolarWinds.Data.AccessDeniedException",
        "FullException": "SolarWinds.Data.AccessDeniedException: Operation not supported on Orion.APM.ComponentSetting\r\n   at SolarWinds.InformationService.Core.CrudProcessor.CreateAccessDeniedException(String message)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.CheckAccessControl(AccessControlOperations operations, IEntityType entity, IAccessControlResolver accessControlResolver)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.CheckAccessControl(AccessControlOperations operations, IEntityType entity, IEnumerable`1 propertyNames, IAccessControlResolver accessControlResolver)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.<CreateInternal>d__18.MoveNext()\r\n   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.Create(String entityType, IDictionary`2 properties, IQueryExecutionContext context)\r\n   at SolarWinds.InformationService.Core.InformationService.Create(String entityType, IDictionary`2 properties)"
    URL: https://<orion_host>:17778/SolarWinds/InformationService/v3/Json/swis://DCA-MONPRD0001.office.ads/Orion/Orion.APM.ComponentSetting/ComponentID=5730,Key="DestinationPointName"
    JSON: {"Value": "DATABASE_NAME"}
    Error:
    {
        "Message": "Operation not supported on Orion.APM.ComponentSetting",
        "ErrorCode": 20,
        "UserMessage": "Operation not supported on Orion.APM.ComponentSetting",
        "ExceptionType": "SolarWinds.Data.AccessDeniedException",
        "FullException": "SolarWinds.Data.AccessDeniedException: Operation not supported on Orion.APM.ComponentSetting\r\n   at SolarWinds.InformationService.Core.CrudProcessor.CreateAccessDeniedException(String message)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.CheckAccessControl(AccessControlOperations operations, IEntityType entity, IAccessControlResolver accessControlResolver)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.CheckAccessControl(AccessControlOperations operations, IEntityType entity, IEnumerable`1 propertyNames, IAccessControlResolver accessControlResolver)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.UpdateInternal(Boolean bulkMode, SwisUriResolver uriResolver, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.Update(SwisUri uri, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)\r\n   at SolarWinds.InformationService.Core.InformationService.Update(String uri, IDictionary`2 propertiesToUpdate)"
    }

  • Is the user specifically a SAM Admin? I encountered a similar error recently having overlooked the IPAM level permissions for the user.

  • Hi Tony,

    thanks for you help, it seems the admin rights for SAM are there. Please see screenshot below.

    This concerns privileges for an AD group of which this user is a member.

    I also tried creating a Orion user in the application with admin rights and the admin user of Orion.

    All these user setups did not give the desired result as well.

    On this page I found it's probably not supported in the version I use (installed in 2017 and upgraded once in 2018): https://thwack.solarwinds.com/product-forums/the-orion-platform/f/orion-sdk/41063/possible-to-update-orion-apm-componentsetting

    So I requested an upgrade (which will need to come with and OS upgrade, so that will take some time).

    For now, I have a good workaround; I create extra service names (CDB and PDB) on each server, as luckily there is only one database with one pluggable database running on each server and use that in the template.

    Thanks again!