Forum Discussion
Joe_Tran
Advisor
7 years ago1 hour ago, mhashemi said:This is my first open source project, so I'm not sure what the etiquette is, on accepting code changes. Did you test your changes in
hotfix/update-lmcollectorproperties-data
? This is exciting.
No worries. This is my first time contributing to a public project .
And yes, I did test it .
Verbose output using current:
> $test_collector_details_update = Update-LogicMonitorCollectorProperties -AccessId $AccessId -AccessKey $AccessKey -AccountName $AccountName -CollectorId $CollectorName -PropertyNames collectorGroupId,escalatingChainId,description,resendIval -PropertyValues 3,1,'TestCollectorNewName',0 -Verbose 2018-07-18T17:32:36: Beginning Update-LogicMonitorCollectorProperties. VERBOSE: 2018-07-18T17:32:36: Finished updating $resourcePath. The value is /setting/collectors/3. VERBOSE: 2018-07-18T17:32:36: Finished updating $data. The value update is {"collectorGroupId":"3"}{"escalatingChainId":"1"}{"description":"TestCollectorNewName"}{"resendIval":"0"}. VERBOSE: 2018-07-18T17:32:36: Executing the REST query. VERBOSE: PUT https://accountname.logicmonitor.com/santaba/rest/setting/collectors/3 with -1-byte payload VERBOSE: received 2137-byte response of content type application/json
Verbose output using PR:
> $test_collector_details_update = Update-LogicMonitorCollectorProperties -AccessId $AccessId -AccessKey $AccessKey -AccountName $AccountName -CollectorId $CollectorName -PropertyNames collectorGroupId,escalatingChainId,description,resendIval -PropertyValues 3,1,'TestCollectorNewName',0 -Verbose 2018-07-18T17:18:11: Beginning Update-LogicMonitorCollectorProperties. VERBOSE: 2018-07-18T17:18:11: Finished updating $resourcePath. The value is /setting/collectors/3. VERBOSE: 2018-07-18T17:18:11: Finished updating $data. The value update is { "description": "TestCollectorNewName", "escalatingChainId": "1", "resendIval": "0", "collectorGroupId": "3" }. VERBOSE: 2018-07-18T17:18:11: Executing the REST query. VERBOSE: PUT https://accountname.logicmonitor.com/santaba/rest/setting/collectors/3 with -1-byte payload VERBOSE: received 2123-byte response of content type application/json
In current, the REST API will only take the first json-object ({"collectorGroupId": "3"} in my example) and ignore the rest.
Related Content
- 5 months ago
- 7 months ago
- 2 years ago