• 0
Joe Williams

Cloning Dashboard Groups With Rest

Question

Is there a way to clone a dashboard group? I am automating our onboard procedure for customers and this is one of the last steps.

Currently I have a form that will automatically create a collector group, resource group, user role, etc.... But I can't seem to clone a dashboard group.

I tried to do the sneaky backdoor way and use developer tools to show me the rest calls, but I keep getting back 415 Unsupported Media Type

My Postman attempts look like this.

{{url}}/dashboard/groups/18/asyncclone?recursive=true

{
    "name": "TestCustomer1",
    "description": "",
    "parentId": "1",
    "widgetTokens": [
        {
            "name": "CompanyName",
            "value": "TestCustomer1"
        },
        {
            "name": "defaultResourceGroup",
            "value": "BaseGroup/Onboarding/TestCustomer1"
        }
    ]
}

Where 18 is the ID of the default dashboards group.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I would like this too. I believe I attempted to use asyncclone in the past but it's not exposed in the API, even unofficially.

 

Share this post


Link to post
Share on other sites
  • 0

Forgive me if you have already tried and discounted this for whatever reason, but my first thought is to

  1. 1) GET the json for the current "Template" using the rest API to get the entirety of its definition
  2. 2) Change the JSON to match the changes you need made to that (customer name, team name, project name)
  3. 3) POST the changed JSON to make the new group
  4. 4) Build a recursive function to walk that hierarchy
  5. 5) Grab each of the dashboards and change the appliesto to match the new set of devices
    1.     a)I'm currently doing that piece with a token at the directory level for each of our customers that I can then just change at the dashboard group level to make a full dashboard suite for them.
    2. 6) Duplicate each of those to the new dashboard group, and change the token.

Share this post


Link to post
Share on other sites
  • 0
1 minute ago, Cole McDonald said:

Forgive me if you have already tried and discounted this for whatever reason, but my first thought is to

  1. 1) GET the json for the current "Template" using the rest API to get the entirety of its definition
  2. 2) Change the JSON to match the changes you need made to that (customer name, team name, project name)
  3. 3) POST the changed JSON to make the new group
  4. 4) Build a recursive function to walk that hierarchy
  5. 5) Grab each of the dashboards and change the appliesto to match the new set of devices
    1.     a)I'm currently doing that piece with a token at the directory level for each of our customers that I can then just change at the dashboard group level to make a full dashboard suite for them.
    2. 6) Duplicate each of those to the new dashboard group, and change the token.

This is the way I will end up probably going, but was hoping I didn't have to go through all of that. I just wanted to simply clone it.

Share this post


Link to post
Share on other sites
  • 0

yeah... I always just assume I'm going to have to build it by hand... not just Logic Monitor, everything.  It's in my DNA though, I started programming when, if you wanted software that did a specific thing, you had to write it. (back in the punch card and teletype days).

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
Answer this question...

×   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.