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.

Impossible to create Orion objects through API (PowerShell SWIS or REST API)

Hello,

I need to create and manage Orion objects (example API Poller) through API (Powershell Swis or REST API). My problem is the lack of documentation provided by Solarwinds. Could you please help me on this topic or tell me if this topic is not possible due to a product limitation ?

Thank you in advance for your help and have a nice day

Regards

  • Possibly, or incorrect documentation. I have opened a case to look into it in more detail

  • Hi

    I found that there is another table that can't be object of CRUD operations although the documentation says any CRUD is allowed.

    When I try to create a record on the Orion.APIPoller.ValueToMonitor table I receive this error in PowerShell:


           $ValueToMonitor = @{
           ApiPollerId = $Queryresult+1;
           StatusDescription = "Up";
           Metric = $Metric;
           Status = 1;
           DetailsUrl = $pivote;
           StringToNumberTransformationOtherValues = 0;
           Type = $Path;
           ThresholdRule = $ThresholdRule;
           CriticalThreshold = $CriticalThreshold;
           WarningThreshold = $WarningThreshold;
           Path = $Path;
           DisplayName = $DisplayName;
           RequestIdDetails = $Queryresult;
           }
    
    $NewOrionAPIPollerInfo = New-SwisObject $swis -EntityType "Orion.APIPoller.ValueToMonitor" -Properties $ValueToMonitor
    
    
    New-SwisObject : Property DetailsUrl of entity type Orion.APIPoller.ValueToMonitor is a computed property and cannot be set during
    Create.
    At C:\Users\chacongj\Documents\Test scripts\PowerShell\Test_API_Poller.ps1:158 char:30
    + ... ollerInfo = New-SwisObject $swis -EntityType "Orion.APIPoller.ValueTo ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [New-SwisObject], FaultException`1
    + FullyQualifiedErrorId : SwisError,SwisPowerShell.NewSwisObject

    Questions:

    (1) Did you receive any feedback about these issues?

    (2) Do you know what exactly should be the flow to create polling data within these tables via CRUD operations?

  • Hello Tony,

    Do you have received any feedback from your open incident ?

    For info I have also contacted the support team for that issue.

    Have a nice day

    Regards