SYSTEM
System Health Check
Description: Get an indication if Mission Control is running or not. No authentication required.
Since:2.0
Usage:GET /api/v1/ping
Example:
GET /api/v1/ping true
PROXIES
Create Proxy
Description:Adds a proxy.
Consumes:application/json
Example:
POST /api/v1/proxies HTTP/1.1 { "name" : "proxy-01", "url" : "http://proxyurl:8080", "sites" : [ { "source_site" : "source-Site", "destination_site" : "destination-Site" } ], "username" : "username", "password" : "password" }
Example:
$ curl 'http://localhost:8080/api/v1/proxies' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -d '{ "name" : "proxy-01", "url" : "http://proxyurl:8080", "sites" : [ { "source_site" : "source-Site", "destination_site" : "destination-Site" } ], "username" : "username", "password" : "password" }'
Create External Proxy
Description:Adds an external proxy.
Since:3.2
Security:Requires an admin user
Usage:POST /api/v1/proxies
Consumes:application/json
Example:
POST /api/v1/proxies HTTP/1.1 { "name" : "proxy-01", "url" : "http://proxyurl:8080", "sites" : [ { "source_site" : "source-Site" } ], "username" : "username", "password" : "password" }
Update Proxy by Name
Description:Updates a proxy.
Since:3.2
Security:Requires an admin user
Usage:POST /api/v1/proxies/{name}
Consumes:application/json
Example:
PUT /api/v1/proxies/proxy-01 HTTP/1.1 { "name" : "proxy-01-1", "url" : "http://a53dacff-7d2a-4991-bea0-231abe891e52:8080", "sites" : [ { "source_site" : "source-Site2", "destination_site" : "destination-Site2" } ], "username" : "username1", "password" : "password1" }
Get List of Proxies
Description:Get the list of proxies.
Since:3.2
Security:Requires an admin user
Usage:Get /api/v1/proxies
Consumes:application/json
Example:
GET /api/v1/proxies HTTP/1.1 [ { "name" : "proxy-01", "url" : "http://ff121cae-f1f1-4639-85ff-cb07c744c730", "sites" : [ { "source_site" : "source-site-name", "destination_site" : "destination-site-name" } ] }, { "name" : "proxy-02", "url" : "http://14dc60cb-e3c2-476f-b4a6-263adf70a34d", "sites" : [ { "source_site" : "source-site-name" } ] } ]
Command line:
$ curl 'http://localhost:8080/api/v1/proxies' -i -u 'admin:password' -H 'Content-Type: application/json; charset=UTF-8'
Get List of Proxies Filtered by Source JPU
Description:Get the list of proxies by source JPU.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v1/proxies?src_JPU={JPU_name}
Consumes:application/json
Example:
GET /api/v1/proxies?src_JPU=artifactory HTTP/1.1 [ { "name" : "proxy-01", "url" : "http://cfc3cf06-18b2-414c-a3e7-12dfd593201d", "sites" : [ { "source_site" : "source-site-name", "destination_site" : "destination-site-name" } ] } ]
Get List of Proxies Filtered by Destination JPU
Description:Get the list of proxies filtered by destination JPU.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v1/proxies?dest_JPU={destination_JPU_name}
Consumes:application/json
Example:
GET /api/v1/proxies?dest_JPU=artifactory HTTP/1.1 [ { "name" : "proxy-01", "url" : "http://609c68a0-9e8c-4104-adac-0623914c85bf", "sites" : [ { "source_site" : "source-site-name", "destination_site" : "destination-site-name" } ] } ]
Get List of Proxies Filtered by Source and Destination JPU
Example:
GET /api/v1/proxies?src_JPU=source-artifactory&dest_JPU=destination [ { "name" : "proxy-01", "url" : "http://609c68a0-9e8c-4104-adac-0623914c85bf", "sites" : [ { "source_site" : "source-site-name", "destination_site" : "destination-site-name" } ] } ]
Get Proxy by Name
Description:Get a proxy by name.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v1/proxies/{name}
Consumes:application/json
Example:
GET /api/v1/proxies/proxy-01 HTTP/1.1 { "name" : "proxy-01", "url" : "http://0277a02d-5267-46c9-a5c9-7836f0bff8fb", "sites" : [ { "source_site" : "source-Site", "destination_site" : "destination-Site" } ] }
Delete Proxy by Name
Description:Removes a proxy from Mission Control.
Since:3.2
Security:Requires an admin user
Usage:DELETE /api/v1/proxies/{name}
Consumes:application/json
DELETE /api/v1/proxies/proxy-01 HTTP/1.1
JPUS
Add JPUs
Description:Adds a new JPU to Mission Control.
Return codes:
201 - Created
409 -Failed to connect to the JPU. Please verify that the JPU information provided is correct
{ "name" : "jpu-0", "url" : "http://jpu:8080/test", "token" : "some-token", "location" : { "city_name" : "San Francisco", "country_code" : "US", "latitude" : 37.7749, "longitude" : 122.4194 }, "proxy_key" : "proxy1" }
Example:
$ curl 'http://localhost:8080/api/v1/JPUs' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createJPU.json
{ "name" : "dev-west", "description" : "Artifactory serving development in West region", "url" : "https://artifactory-west.acme.com/artifactory", "username" : "admin", "password" : "password", "type" : "ARTIFACTORY" } 201 Created
Update JPU
Description:Updates a JPU
Return codes:
204 - No Content
409 - Url
{ "name" : "", "description" : " ", "url" : " ", "username" : " ", "password" : " " }
Example:
$ curl 'http://localhost:8080/api/ui/v1/jpus/JPU-3' -i -X PUT \
{ "name" : "new_name", "url" : "http://new-jpu-url:8080/jpu.test", "location" : { "city_name" : "Toulouse", "country_code" : "FR", "latitude" : 43.6043, "longitude" : 1.4437 }, "proxy_key" : "proxy1" }
Get JPU List
Description:Get a list of all JPUs
Example:
$ curl -XGET 'http://localhost:8080/api/v1/JPUs' -uadmin:password
[{“名称”:“阿根廷”,“描述”:“工件ory serving development in Argentina", "url": "http://10.0.0.8:8082/artifactory", "type": "ARTIFACTORY", "JPU_type": "jfrt", "JPU_id": "jfrt@01ccgfzxdyqd3y0d816fns0zhh", "site": { "city": { "country_code": "AR", "latitude": -34.61315, "longitude": -58.37723, "name": "Buenos Aires" }, "description": "", "name": "Argentina" } }, { "name": "China", "description" : "Artifactory serving development in China", "url": "http://10.0.0.8:8081/artifactory", "type": "ARTIFACTORY", "JPU_type": "jfrt", "JPU_id": "jfrt@01cdmdjarccxy009wnzmwf06jp", "site": { "city": { "country_code": "CN", "latitude": 31.22222, "longitude": 121.45806, "name": "Shanghai" }, "description": "", "name": "China" } } ] 200 Success
Get List of JPUs with Proxy Based on Source
Example:
GET / api / v1 / JPUs吗?= % 20 artifactory % 20南源来源e HTTP/1.1 [ { "name" : "Source Artifactory Name", "url" : "http://Source Artifactory Name.com/artifactory", "type" : "ARTIFACTORY", "JPU_type" : "jfrt", "JPU_id" : "jfrt@01crqghgxara0b0ej8nct10dyd", "site" : { "name" : "Source Site Name", "description" : "59551ac7-d8a3-426d-90a7-730219f11ddc", "city" : { "name" : "73955951-ef5c-4864-a118-561b117fdb7c", "latitude" : 66.778899, "longitude" : 44.556644 } } }, { "name" : "Destination Artifactory Name", "url" : "http://Destination Artifactory Name.com/artifactory", "type" : "ARTIFACTORY", "JPU_type" : "jfrt", "JPU_id" : "jfrt@01crqghgxf30e91k6gascc1r7p", "site" : { "name" : "Destination Site Name", "description" : "06dce948-ef85-45d6-b600-c2dc8ca57a63", "city" : { "name" : "c64f2329-2021-49ec-9188-cea1840f9df6", "latitude" : 66.778899, "longitude" : 44.556644 } }, "proxy" : { "url" : "http://proxy.com" } } ]
Get JPU by Name with Proxy based on Source
Example:
GET / api / v1 / JPUs / 4001 crqgh6fyxtpn1eyddfwa1hk1 jfrt %?source=Source%20Artifactory%20Name { "name" : "Destination Artifactory Name", "url" : "http://Destination Artifactory Name.com/artifactory", "type" : "ARTIFACTORY", "JPU_type" : "jfrt", "JPU_id" : "jfrt@01crqgh6fyxtpn1eyddfwa1hk1", "site" : { "name" : "Destination Site Name", "description" : "31c51fe9-dfa0-48d4-8ce7-675e2b6b1b43", "city" : { "name" : "28759984-cf1a-41bc-952c-33e4e3a7c4a0", "latitude" : 66.778899, "longitude" : 44.556644 } }, "proxy" : { "url" : "http://proxy.com" } }
Delete JPU
Description:Removes a JPU from Mission Control
200 - Success
204 - No content
404 - Not found
Example:
$ curl 'http://localhost:8080/api/ui/v1/jpus/JPU-321' -i -X DELETE \
Get Repository List
Description:Gets the list of repositories in the specified Artifactory JPU
200 - Success
Example:
$ curl -XGET 'http://localhost:8080/api/v1/JPUs/artifactory/{name}/repositories' -uadmin:password
[ { "repository_key": "bower-local", "description": "", "type": "local", "package_type": "bower" }, { "repository_key": "generic-local", "description": "", "type": "local", "package_type": "generic" }, { "repository_key": "libs-release-local", "description": "", "type": "local", "package_type": "maven" }, ... { "repository_key": "npm", "description": "", "type": "virtual", "package_type": "npm" } ]
ACCESS FEDERATION
Get Access Federation Configuration for a Single JPU
Description:Gets the Access Federation configuration for a specific JDPD. Returns the Federation targets configured for the provided JPU.
200 - Success
400 - The JPU is not a valid Access Federation candidate.
404 - The JPU was not found or it is not an Artifactory.
Consumes:application/json
Request Example:
GET /api/v1/JPUs/access/JPU-1/federation HTTP/1.1
Response Example:
{ "entities" : [ "GROUPS", "USERS" ], "targets" : [ { "name" : "JFP-2", "code" : "access2JPUId", "url" : "http://localhost:37837" } ] }
Get Access Federation Configuration for All JPUs
Description:Gets the Access Federation configurations for all the JPUs.
200 - Success
Request Example:
GET /api/v1/JPUs/access/federation?include_non_configured=false HTTP/1.1
Response Example:
[ { "source" : "artifactory1", "entities" : [ "GROUPS", "USERS" ], "targets" : [ { "name" : "JPU-2", "code" : "access2JPUId", "url" : "url2" } ] } ]
Configure Access Federation on a JPU
Description:Configures Access Federation for a specific Artifactory JPU. As a pre-requisite, the source and targets must have been configured properly for Access Federation based onthis.
Since:3.3
Security:Requires an admin user
Usage:PUT /api/v1/JPUs/access/{JPUName}/federation
400, 422 - Invalid input
404 - JPU not found or not an Artifactory
Example Request:
PUT /api/v1/JPUs/access/artifactory1/federation HTTP/1.1 { "entities" : [ "USERS", "GROUPS" ], "targets" : [ { "name" : "artifactory2", "url" : "http://localhost:8080" } ] }
Example Response:
[ { "label" : "Get configuration of artifactory1", "status" : "OK" }, { "label" : "Get Access token from artifactory1", "status" : "OK" }, { "label" : "Check if artifactory2 trusts artifactory1", "status" : "OK" }, { "label" : "Send configuration to artifactory1", "status" : "OK" }, { "label" : "Add target artifactory2 to artifactory1", "status" : "OK" } ]
Get Access Federation Candidates
Description:Gets the Access Federation for a specific JPU.
Since:3.3
Security:Requires an admin user
Usage:GET /api/v1/JPUs/access/federation/candidates
200 - Success
Request Example:
GET /api/v1/jpus/access/federation/candidates HTTP/1.1
Response Example:
["JPU name 1", "JPU name 2"]
Create Mesh
Description:Creates a mesh topology.As a pre-requisite, the source and targets must have been configured properly for Access Federation based onthis.
Since:3.3
Security:Requires an admin user
Usage:POST /api/v1/jpus/access/federation/create_mesh
Return codes:
400, 422 - Invalid input
404 - JPU not found or not an Artifactory
Request Example:
POST /api/v1/jpus/access/federation/create_mesh HTTP/1.1
Response Example:
{ "jpus": [ "JPU name 1", "JPU name 2" ], "entities": [ "USERS", "GROUPS", "PERMISSIONS", "TOKENS" ] }
SUPPORT
Create Support Bundle
Description: Create a new support bundle.
Since:3.2
Security:Requires an admin user
Notes: All bundle items are optional.
Usage: POST /api/v1/system/support/bundle
Return codes:
202 - Support bundle is being created and will be available soon
400 - Invalid option values
403 - Unauthorized
Sample Usage:
POST /api/v1/system/support/bundle HTTP/1.1 { "name" : "My support bundle", "description" : "Support bundle generated because of issue XYZ", "parameters" : { "configuration" : true, "system" : true, "logs" : { "include" : true, "start_date" : "2018-09-19", "end_date" : "2018-09-20" }, "thread_dump" : { "count" : 1, "interval" : 0 } } }
Example:
$ curl -X POST -uadmin:password https://my-mission-control.jfrogdev.co/api/v1/system/support/bundle -H 'Content-Type: application/json' \ -d '{ "name": "JFMC support bundle", "description": "Support bundle generated because of issue with XYZ", "parameters": { "configuration": true, "system": true, "thread_dump": { "count": 1, "interval": 0 }, "logs": { "include": true, "start_date": "2018-12-25", "end_date": "2019-01-07" } } }'
Example Output:
HTTP/1.1 202 Accepted Content-Type: application/json X-JFrog-JPU-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 247 { "id" : "SUPP20180912154413548991", "artifactory" : { "JPU_id" : "jfrt@4754684682741", "bundle_url" : "http://artifactory.www.si-fil.com/artifactory/jfrog-support-bundle/SUPP20180912154413548991/jfmc/test_JPU } }
Get Support Bundles List
Description: Get the list of available support bundles.
Since:3.2
Security:Requires an admin user
Usage: GET /api/v1/system/support/bundles
Return codes:
200 - Successful
403 - Unauthorized
Example:
GET /api/v1/system/support/bundles HTTP/1.1
Response:
{ "count" : 2, "bundles" : [ { "name" : "A", "description" : "aaa", "id" : "1", "created" : "2018-10-01T09:50:11Z" }, { "name" : "B", "id" : "2", "created" : "2018-10-01T09:50:11Z" } ] }
Get Details of a Support Bundle
Description:被一个特定的细节支持包。
Since:3.2
Security:Requires an admin user
Usage: GET/api/v1/system/support/bundle/{id}
Return codes:
200 - Successful
403 - Unauthorized
404 - Supplied ID does not refer to an existing support bundle
Example:
GET /api/v1/system/support/bundle/SUPP20180912154413548991 HTTP/1.1
Response:
{ "name" : "issue #1234", "description" : "Support bundle created for issue #1234 investigation", "artifactory" : { "JPU_id" : "jfrt@4754684682741", "bundle_url" : "http://artifactory.www.si-fil.com/artifactory/jfrog-admin-supportbundle/SUPP20180912154413548991/jfmc/01c7b8rg70nrqr1cck7k4x0yp7" }, "parameters" : { "configuration" : true, "system" : true, "logs" : { "include" : true, "start_date" : "2018-09-30", "end_date" : "2018-10-01" }, "thread_dump" : { "count" : 1, "interval" : 0 } }, "available" : 5, "created" : "2018-10-01T09:50:10Z" }
Download Support Bundle
Description: Downloads a support bundle as a ZIP file.
Since:3.2
Security:Requires an admin user.You need to have the "Download folder" permission enabled on Artifactory.
Usage: GET/api/v1/system/support/bundle/{id}/archive
Return codes:
200 - Successful
403 - Unauthorized (it may be that the "Download folder" option is not enabled on the Authentication Provider Artifactory)
404 - Supplied ID does not refer to an existing support bundle or the ZIP cannot be found in the Authentication Provider Artifactory repository
Example:
GET /api/v1/system/support/bundle/SUPP20180912154413548991/archive HTTP/1.1
Delete Support Bundle
Description: Deletes a support bundle, along with the ZIP file in Artifactory.
Since:3.2
Security:Requires an admin user
Usage: DELETE/api/v1/system/support/bundle/{id}
Return codes:
204 - Successful
403 - Unauthorized
404 - Supplied ID does not refer to an existing support bundle
Example:
DELETE /api/v1/system/support/bundle/SUPP20180912154413548991 HTTP/1.1
Create Platform Support Bundle
Description: Create a new support bundle.create support bundle for several JPUs
Since:3.5
Security:Requires an admin user
Usage: POST /api/v1/platform/support/bundle
Return codes:
200 - Support bundle is being created and will be available soon
422 - JPU list empty or too large
504 - Timeout
400 - Invalid Request
Sample Usage:
POST /api/v1/system/support/bundle HTTP/1.1 { "name" : "my_support_bundle", "description" : "Platform Support Bundle test description", "JPUs" : [ "self", "jfrt@64845741457245711" ], "parameters" : { "configuration" : true, "system" : true, "logs" : { "include" : true, "start_date" : "2019-03-14", "end_date" : "2019-03-15" }, "thread_dump" : { "count" : 1, "interval" : 0 } } }
Example Output:
200 OK Content-Type: application/json X-JFrog-JPU-Id: jfrt@4754684682741 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 487 { "id" : "20190315-1624-cab48ff6-33e4-4e17-b2c9-845a71ffa3a7", "locations" : [ { "JPU_id" : "jfrt@01d612nxv8yfcn119xsj7d1jrz", "artifactory" : { "JPU_id" : "jfrt@other.www.si-fil.com", "bundle_url" : "http://other.www.si-fil.com/artifactory/" } }, { "JPU_id" : "jfmc@01c7b8rg70nrqr1cck7k4x0yp7", "artifactory" : { "JPU_id" : "jfrt@auth-provider.www.si-fil.com", "bundle_url" : "http://auth-provider.www.si-fil.com/artifactory/" } } ] }
Get Platform Support Bundles List
Description: Gets a list of previously created support bundles.
Since:3.5
Security:Requires an admin user
Usage: GET /api/v1/platform/support/bundles
Return codes:
200 - OK
400 - Invalid Request
Sample Usage:
GET /api/v1/platform/support/bundles HTTP/1.1 Authorization: Basic YWRtaW46cGFzc3dvcmQ= Content-Type: application/json; charset=UTF-8 Host: localhost:8080
Example Output:
HTTP / 1.1 200 OK - type: application / json X-JFrog-JPU-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 319 { "bundles" : [ { "id" : "20190218-1554-c5043f76-4d6d-49e2-9ab7-2999b7af02ef", "name" : "sb-name", "description" : "sb-description", "created" : "2019-02-18T15:54:00Z" }, { "id" : "20190218-1553-bb12b2e0-3b16-44aa-889a-513c14976542", "created" : "2019-02-18T15:53:00Z" } ], "count" : 2 }
Get Platform Support Bundle Metadata
Description: Gets the metadata for a previously created support bundle.
Since:3.5
Security:Requires an admin user
Usage: GET /api/v1/system/support/bundle/{id}
Return codes:
200 - OK
400 - Invalid Request
Sample Usage:
GET /api/v1/platform/support/bundle/20190218-1554-88722539-78af-41bc-a5d7-e7567fb7189f HTTP/1.1 Authorization: Basic YWRtaW46cGFzc3dvcmQ= Content-Type: application/json; charset=UTF-8 Host: localhost:8080
Example Output:
HTTP / 1.1 200 OK - type: application / json X-JFrog-JPU-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 742 { "id" : "20190218-1554-88722539-78af-41bc-a5d7-e7567fb7189f", "name" : "sb-name", "description" : "sb-description", "status" : "success", "created" : "2019-02-18T15:54:00Z", "parameters" : { "configuration" : true, "system" : true, "logs" : { "include" : true, "start_date" : "2019-03-14", "end_date" : "2019-03-15" }, "thread_dump" : { "count" : 1, "interval" : 0 } }, "locations" : [ { "JPU_id" : "jfxr@2222", "artifactory" : { "JPU_id" : "jfrt@jfxr", "bundle_url" : "https://art.jfxr" } }, { "JPU_id" : "jfds@1111", "artifactory" : { "JPU_id" : "jfrt@jfds", "bundle_url" : "https://arti.jfds" } } ] }
Get Platform Support Bundle
Description: Downloads a previously created support bundle as a ZIP file.
Since:3.5
Security:Requires an admin user
Usage: GET /api/v1/platform/support/bundle/{id}/archive
Return codes:
200 - Support bundle zip will be downloaded
400 - Invalid Request
Sample Usage:
GET /api/v1/platform/support/bundle/20190218-1553-2ea5aa8c-0ee7-4981-9028-d19c653b423a/archive HTTP/1.1 Authorization: Basic YWRtaW46cGFzc3dvcmQ= Content-Type: application/json; charset=UTF-8 Host: localhost:8080
Example Output:
HTTP/1.1 200 OK Content-Disposition: attachment; filename="20190218-1553-2ea5aa8c-0ee7-4981-9028-d19c653b423a.zip" Content-Type: application/zip X-JFrog-JPU-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 28
删除平台支持包
Description: Deletes a previously created support bundle, along with the ZIP file in Artifactory.
Since:3.5
Security:Requires an admin user
Usage: DELETE /api/v1/platform/support/bundle/{id}
Return codes:
200 - Support bundle successfully deleted
404 - Support bundle id not found or invalid
500 - Support could not be deleted
Sample Usage:
DELETE /api/v1/platform/support/bundle/20190218-1554-7d3f4afa-a129-435e-822a-d19a052f9b4a HTTP/1.1 Authorization: Basic YWRtaW46cGFzc3dvcmQ= Content-Type: application/json; charset=UTF-8 Host: localhost:8080
Example Output:
HTTP / 1.1 200 OK - type: application / json X-JFrog-JPU-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 110 { "deleted" : [ "jfmc@01c7b8rg70nrqr1cck7k4x0yp7", "jfrt@01d612qkz4bjqt0e36d13s1ry5" ], "failures" : [ ] }
LICENSE BUCKETS
Get Buckets
Description:Retrieves all the license buckets in the system.
Return codes:
200 - Success
[ { "id" : "", "name" : " ", "size" : , "license_type": " " } ]
Sample Usage:
GET /api/v1/buckets [ { "id" : "12345", "name" : "bucket-test-1", "size" : 10, "license_type": "ENTERPRISE" }, { "id" : "1234567", "name": "bucket-test-2", "size" : 5, "license_type": "EDGE" } ]
Create Bucket
Description:Creates a new License Bucket.
Return codes:
201 - Created
409 - Name '
409 - Url '
{ "bucket_name" : "", "bucket_url" : " ", "bucket_key" : " " }
Example:
$ curl 'http://localhost:8080/api/v1/buckets' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createbucket.json
createbucket.json
{ "bucket_name" : "main-bucket", "bucket_url" : "https://bintray.www.si-fil.com/license-buckets/test_www.si-fil.com/12345678/12345678.json?expiry=1528199600307&id=ABCDEFGhiJkLmNoPQR", "bucket_key" : "16629dbf7fefc9d179b36ba005685c2dd8376aad3278178e735da1633c6bd3c6" }
201 Created { "subject" : "JFrog", "product_name" : "Artifactory", "product_id" : 6, "license_type" : "HA", "issued_date" : "2018-04-12T16:02:55.549+03:00", "valid_date" : "2019-04-12T16:02:54.759+03:00", "quantity" : 10, "signature" : "06307c34405e6ab70c5d249a7ba7cffd81947d5f", "name" : "main-bucket", "used" : 0, "url" : "https://bintray.www.si-fil.com/license-buckets/test_www.si-fil.com/12345678/12345678.json?expiry=1528199600307&id=ABCDEFGhiJkLmNoPQR" }
Upload Bucket
Description:Uploads and creates a new License Bucket.
Since:3.4.2
Security:Requires an admin user
Usage:POST /api/v1/buckets
Content-Type:multipart/form-data
Return codes:
201 - Created
400 - Your bucket file could not be used. Please verify that the file is correct and that the key is valid.
409 - Name '
Consumes:application/json
bucket_name | Bucket’s name in Mission Control bucket_file | Path to the bucket file bucket_key | Key used to decrypt the bucket
Produces:application/json
{ "subject" : "JFrog", "product_name" : "Artifactory", "product_id" : 6, "license_type" : "HA", "issued_date" : "2016-04-12T16:02:55.549+03:00", "valid_date" : "2017-04-12T16:02:54.759+03:00", "quantity" : 10, "identifier" : "bucket-test-1", "signature" : "06307c34405e6ab70c5d249a7ba7cffd81947d5f", "name" : "Test-bucket-name", "used" : 0 }
Example:
curl 'http://localhost:8080/api/v1/buckets' -i -u 'admin:password' -X POST -H 'Content-Type: multipart/form-data' -F 'bucket_file=@/tmp/728939433.json;type=application/octet-stream' -F 'bucket_key=d18fc5bc05dc3b6419ab6cd127f16cf6b57d7650ea0ef03cde130918f6f25487' -F 'bucket_name=mybucket'
Delete Bucket
Description:Deletes a bucket.
Since:3.0.0 Security: Requires an admin user
Usage:DELETE /api/v1/buckets/{name}
Return codes:204 - Success
Example:
$ curl -XDELETE 'http://localhost:8080/api/v1/buckets/main-bucket' -uadmin:password -H "Content-Type: application/json" 204 No Content
Get Bucket Status
Description:Get the report for a specified bucket.
Since:2.0
Security:Requires an admin user
Usage:GET /api/v1/buckets/{identifier}/report
Produces:application/json
{ "id": "", "size": , "licenses": { "used": , "available": , "max_used": } }
Return codes:
200 - Success
Example:
$ curl -XGET 'http://localhost:8080/api/v1/buckets/415921223/report' -i -u 'admin:password'
{ "id": "415921223", "size": 5, "licenses": { "used": 0, "available": 5, "max_used": 0 } } 200 Success
Attach License
Description:Attaches a license from a bucket to the specified JPU.
{ "JPU_name" : "JPU name", "deploy" :"number_of_licenses" : }
Produces:application/json
200 - Success
409 - "Deployment of multiple license is supported for cluster only"
Example:
$ curl -POST 'http://localhost:8080/api/v1/attach_lic/buckets/{name}' -i -u 'admin:password' -H 'Content-Type: application/json; charset=UTF-8' -T attachlicense.json
{ "JPU_name" : "JPUName", "deploy" : false }
Since deploy is false, the response will return a license_key
{ "license_key" : "" }
$ curl 'http://localhost:8080/api/v1/attach_lic/buckets/{name}' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T attachlicense.json
{ "number_of_licenses" : 5, "JPU_name" : "JPUName", "deploy" : true }
This applies 5 licenses to the Artifactory in the specified Platform Deployment. Even if there are only 3 nodes available in the Artifactory cluster, 5 licenses will be applied.