Description: Adds a node.
Security: Requires admin credentials
Usage: POST api/v1/nodes
Produces: application/json
Parameters:
Parameter | Data Type | Description | Required/Optional |
|---|---|---|---|
| Integer | Id of the Project. | Required |
| String | Name of the node pool. | Required |
| Boolean | Set to | Required |
| Boolean | Determine auto or manual initialization. | Required |
| String | Node address for auto-initialization. | Required if |
| Boolean | Enable/disable the use of swap space to increase the amount of virtual memory available to the node. Not available to Windows node pools. | Optional |
| String | Port to use for SSH for auto-initialization. This is usually port 22, but is configurable. For Auto initialization type only. | Optional |
| String | Optional | |
| Integer | Id of the node pool. | Required |
| Object containing configuration for the cloud provider of on-demand node. You can set the following properties:
| Optional | |
Sample Request:
curl -L -X POST 'http://localhost:8082/pipelines/api/v1/nodes' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
--data-raw '{
"projectId": 1,
"friendlyName": "node1",
"isOnDemand": true,
"isAutoInitialized": false,
"nodePoolId": 2
}'Sample Response:
{
"instanceInfo": null,
"providerMetadataPropertyBag": {
"instanceSize": "n1-standard-1",
"operatingSystem": "Ubuntu_18.04",
"uniqueToken": "bd7e3519-aab5-4422-a539-8132494d4175"
},
"initPropertyBag": {
"insecureDockerRegistries": []
},
"systemPropertyBag": {
"token": "358e3342-7d8f-4bf2-b783-b25bbc90f605"
},
"id": 340,
"projectId": 1,
"statusCode": 4005,
"friendlyName": "node1",
"isAutoInitialized": false,
"instanceId": null,
"IPAddress": null,
"isOnDemand": true,
"statusLastUpdatedAt": "2021-04-30T11:58:18.013Z",
"isSwapEnabled": false,
"createdBy": "3",
"updatedBy": "3",
"stopRequested": false,
"nodePoolId": 2,
"intendedBuildPlaneVersion": "0.0.0-m000",
"projectIntegrationId": 11,
"sshPort": null,
"sshUser": null,
"updatedAt": "2021-04-30T11:58:18.079Z",
"createdAt": "2021-04-30T11:58:18.013Z",
"isDebug": null,
"currentBuildPlaneVersion": null,
"stepId": null,
"lastInitializedAt": null,
"provisionedAt": null
}
Response Codes:
200: Success
400: If required fields are not included in the request body or if there are invalid parameters.