Add a Node

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Adds a node.

Security: Requires admin credentials

Usage: POST api/v1/nodes

Produces: application/json

Parameters:

Parameter

Data Type

Description

Required/Optional

projectId

Integer

Id of the Project.

Required

friendlyName

String

Name of the node pool.

Required

isOnDemand

Boolean

Set to true for dynamic node pool. Set to false for static node pool.

Required

isAutoInitialized

Boolean

Determine auto or manual initialization.

Required

IPAddress

String

Node address for auto-initialization.

Required if isAutoInitialized is set as true.

isSwapEnabled

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

sshPort

String

Port to use for SSH for auto-initialization. This is usually port 22, but is configurable.

For Auto initialization type only.

Optional

instanceId

String

Optional

nodePoolId

Integer

Id of the node pool.

Required

providerMetadataPropertyBag

Object containing configuration for the cloud provider of on-demand node.

You can set the following properties:

  • sshUser

  • sshPort

  • region

  • instanceSize

  • imageId

  • zone

  • imageMetadata

  • nicName

  • vmName

  • resourceGroupName

  • subscriptionId

  • subnetName

  • vnetName

  • securityGroupName

  • tags

  • publicSshKey

  • adminUsername

  • adminPassword

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.