Using the Import API in Golden Configuration
  • 23 May 2023
  • Dark
    Light
  • PDF

Using the Import API in Golden Configuration

  • Dark
    Light
  • PDF

Article summary

This section provides the backend information for performing importing, overwriting, and renaming Golden Configurations. Here are the parameters for calling the API:

{
    "trees": [
        {
            "data": [{treeVersion1}, {treeVersion2}],
            "overwrite": true
        },
        {
            "data": [{treeVersion1}, {treeVersion2}],
            "newName": "New GC Name"
        },
        {
            "data": [{treeVersion1}, {treeVersion2}]
        }
    ],
    "options": {}
}

Each element in the trees array represents a Golden Configuration. Within each Golden Configuration, the data array represents each version that belongs to a Golden Configuration. For example, if a Golden Configuration has three versions, then the data array is going to have three objects inside of it for each version.

So, the payload is essentially saying to import three Golden Configurations and each of those three Golden Configurations has two versions each.

Overwrite a Golden Configuration

To overwrite for a Golden Configuration, you have to pass the 
overwrite: true property.

Renaming a Golden Configuration

To rename a Golden Configuration, you have to pass in the newName  property.

Importing a Golden Configuration

To import a Golden Configuration, you can just pass in the import data and nothing else . It will:

  • Either import the tree normally assuming it’s not a duplicate.
  • Index the name if it IS a duplicate and a tree with the name already exists.
    • If a tree called IOS Tree already exists then it’ll import it as IOS Tree (1).

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.