- 23 May 2023
-
DarkLight
-
PDF
Using the Import API in Golden Configuration
- Updated on 23 May 2023
-
DarkLight
-
PDF
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 asIOS Tree (1)
.
- If a tree called