Add JPD

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Adds a new JPD to Mission Control. In 4.x, it is no longer necessary to register individual services. When a JPD is registered, Mission Control queries for all the services installed in the JPD. This list is updated periodically and is also used to get the status of the individual services installed in the JPD. The location information is also associated with the JPD. This replaces both Sites and Services APIs in the prior versions.

Since: 4.0

Notes: Requires Artifactory Enterprise

Security: Requires an admin user

Usage: POST /mc/api/v1/jpds

Return codes:

201 - Created

400 - Failed to connect to the JPD. Please verify that the JPD information provided is correct

409 - Conflicts with an existing JPD (URL, name)

Consumes: application/json

{
+  "name" : "<JPD name>",
+  "url" : "<JPD URL>",                   // The JPD base URL
+  "token" : "<Join Key>",                // The JPD join key 
+  "location" : {
+    "city_name" : "<City name>",
+    "country_code" : "<Country code>",
+    "latitude" : <Latitude>,
+    "longitude" : <Longitude>
  },
-  "tags" : [ "<Tag 0>", "<Tag 1>" ]
}

+=mandatory; -=optional

Sample Usage:

POST /api/v1/jpds
{
    "name" : "dev-west",
    "url" : "https://artifactory-west.acme.com",
    "token" : "<Join token>",
    "location" : {
                "city_name" : "San Francisco",
            "country_code" : "US",
            "latitude" : 37.7749,
            "longitude" : 122.4194
        },
   "tags" : [ "prod", "dev" ]
}

To add a legacy JPD (Artifactory 6.x)

POST /api/v1/jpds
{
+  "name" : "<JPD name>",
+  "url" : "<JPD URL>",                   // The JPD base URL
+  "username" : "<admin username>",               
+  "password" : "<admin pasword>",                
+  "location" : {
+    "city_name" : "<City name>",
+    "country_code" : "<Country code>",
+    "latitude" : <Latitude>,
+    "longitude" : <Longitude>
  },
-  "tags" : [ "<Tag 0>", "<Tag 1>" ]
}