- 18 Oct 2024
-
DarkLight
-
PDF
Using the Import API in Golden Configuration
- Updated on 18 Oct 2024
-
DarkLight
-
PDF
Import API Parameters
This section provides developer information for importing, overwriting, and renaming Golden Configurations ("GC") using an options parameter in the GC Import API.
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. Consequently, the payload is sending a request 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 is not a duplicate.
- Index the name if a tree with the name already exists. For example, if a tree called
IOS Tree
already exists then it will import asIOS Tree (1)
.