pmeyer

Collector REST API Requests

Recommended Posts

I would like the REST API to support

  • Scheduling a collector version update
  • Applying a one-time collector version update
  • Working with the Collector Custom Properties (recently added I think, but don't see anything in the online documentation about support in REST API).

Share this post


Link to post
Share on other sites

Hey Phil,

You can actually do all of those with v1 of the API (via onetimeUpgradeInfo, automaticUpgradeInfo, and customProperties fields, respectively), it's just cumbersome to update the Collector via PUT. With v2 of our REST API, which is about to be released, we'll offer update via PATCH, which should make all three of those actions significantly easier. The v1 API docs can probably also use more detail regarding manipulating those three fields - I can update those. 

Thanks,

Sarah

Share this post


Link to post
Share on other sites

What is the value that 'onetimeUpgradeInfo' should be set to?  I tried setting it to '27003' (as an integer), and the call comes back as 'Invalid json body'.

{
    "collectorGroupName":  null,
    "description":  "lsfregprd-Collector for vpc-0e4ddd0f271668f34",
    "onetimeUpgradeInfo":  27003,
    "enableFailBack":  true,
    "suppressAlertClear":  false,
    "escalatingChainId":  3,
    "backupAgentId":  0,
    "enableFailOverOnCollectorDevice":  false,
    "collectorGroupId":  null,
    "resendIval":  0
}

 

Share this post


Link to post
Share on other sites

It's a JSON object that should include the following fields: majorVersion, minorVersion, startEpoch, description. 

So if you're trying to add a one time upgrade to 27.003, it might look like this:

{"majorVersion":27,"minorVersion": 3,"startEpoch": 1538420400,"description":"upgrading to the 27003"}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.