To create a Repository Node on the Master the Master Node ID is required. Building on the previous request, get the node list with a query and field parameters. The “query” ensures only the Master Node is returned and “fields” indicates that the response should only include the requested fields.
The response then contains the Master node object with its ID field and page information.
A Repository Node is created on an OS Host node and the host node ID is required for the creation request. Using the Master Node ID received in the previous example the Repository Node is now created using the Master Node as its host (known as the proxy node). Creation request typically use the HTTP POST method (curl automatically applies the POST method when data is added to the request).
Repository Node creation is done immediately and the response contains the created Node details.
curl --insecure --cookie demosession "https://demomaster/API/7.1/master/NodeManager/objects/Nodes?query=(master =true)&fields=id"
{ "node": [ { "id": "demomaster@BZ-334922-442788-343Z2Z-YYZ744[0-1-1]" } ], "pageInfo": { "end": true, "totalCount": 1 } }
curl --insecure --cookie demosession "https://demomaster/API/7.1/master/RepositoryNodeHandler/objects/Repositor ies" --data @createrepository.json --header "Content-Type: application/json"
{ "blockSize": "e16K", "capacityCriticalLevel": 95, "capacityWarningLevel": 85, "cloudOptimized": false, "deduplication": false, "encrypted": false, "generation": "eREPOSITORY_GENERATION_2", "id": "RepositoryHP@00-25FAAB-3B94CF-459595-78584C[1-1-8D]", "isMounted": false, "name": "RepositoryHP", "paths": { "checksums": "F:\\RepositoryHP\\repository\\streams", "data": "F:\\RepositoryHP\\repository\\streams", "metadata": "F:\\RepositoryHP\\repository\\metadata", "metadataStreams": "F:\\RepositoryHP\\repository\\metadatastreams", "root": "F:\\RepositoryHP\\" }, "proxyNodeId": "demomaster@BZ-334922-442788-343Z2Z-YYZ744[0-1-1]", "timestamp": "2020-05-11T16:20:02", "userTags": [ ] }
{ "blockSize": "e16K", "capacityCriticalLevel": 95, "capacityWarningLevel": 85, "cloudOptimized": false, "deduplication": false, "encrypted": false, "generation": "eREPOSITORY_GENERATION_2", "import": false, "name": "RepositoryHP", "nodeType": "Repository", "paths": { "checksums": "", "data": "", "metadata": "", "root": "F:" }, "proxyNodeId": "demomaster@BZ-334922-442788-343Z2Z-YYZ744[0-1-1]", "resourceGroup": null }