系统
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 JPD
Description:Get the list of proxies by source JPD.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v1/proxies?src_JPD={JPD_name}
Consumes:application/json
Example:
GET /api/v1/proxies?src_JPD=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 JPD
Description:Get the list of proxies filtered by destination JPD.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v1/proxies?dest_JPD={destination_JPD_name}
Consumes:application/json
Example:
GET /api/v1/proxies?dest_JPD=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 JPD
Example:
GET /api/v1/proxies?src_JPD=source-artifactory&dest_JPD=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
SITES
These are the relevant fields when configuring sites:
Field | Type | Optional | Description |
---|---|---|---|
name |
String | false | Site's name |
description | String | true | Site's description |
city | Object | false | Site's city |
city.name | String | true | City's name |
city.country_code | String | true | City's country code |
city.longitude | Number | false | City's longitude |
city.latitude | Number | false | City's latitude |
JPDs | Array | true | Names of JPDs |
Create Site
Description:Create a new site.
Return codes:
201 - No Content
400 -Couldn't find JPD(s) with following name(s):, '
409 -Name '<Site name>' already exists.
{ "name" : "", "description" : " ", "city" : { "name" : " ", "country_code" : " ", "latitude" : , "longitude" : }, "JPDs" : [ " " ] }
$ curl 'http://localhost:8080/api/v1/sites' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createsite.json
{ "name": "us-west", "description": "US West coast site", "city": { "name": "Sunnyvale", "country_code": "US", "latitude": 37.368830, "longitude": -122.036350 }, "JPDs": ["arti-west", "xray-west"] }
Update Site
Description: Updates an exiting site by name.
Security: Requires an admin user
Usage: PUT /api/v1/sites/{name}
Return codes:
204 - No Content
409 - The entity 'Site' with identifier '
{ "name" : "", "description" : " ", "city" : { "name" : " ", "country_code" : " ", "latitude" : , "longitude" : }, "JPDs" : [ { "name" : " ", "type" : " " }] }
Example:
In this example, an existing site named Argentina is being updated to Mexico Data Center with appropriate attributes. If the site 'Argentina' exists,204 No Contentwill be returned
$ curl -XPUT 'http://localhost:8080/api/v1/sites/Argentina' -i -u 'admin:password' -H 'Content-Type: application/json; charset=UTF-8' -T updatesite.json
{ "name" : "Mexico Data Center", "description" : "Updated site description", "city" : { "name" : "Mexico City", "country_code" : "MX", "latitude" : 19.428470, "longitude" : -99.127660 } }
Partial Update Site By Name
Description:Updates a sitewithout updating the attributes.
Since:2.1
Return codes:
204 - No Content
Consumes:application/json
PATCH /api/v1/sites/{name}
Example:
PATCH /api/v1/sites/Site%20name HTTP/1.1 Content-Type: application/json; charset=UTF-8 Host: localhost:8080 Content-Length: 119 { "name" : "Updated site name", "description" : "Updated site description", "JPDs" : [ "Artifactory name" ] } HTTP/1.1 204 No Content
Example:
$ curl 'http://localhost:8080/api/v1/sites/Site%20name' -i -u 'admin:password' -X PATCH -H 'Content-Type: application/json; charset=UTF-8' -d '{ "name" : "Updated site name", "description" : "Updated site description", "JPDs" : [ "Artifactory name" ] }'
Get Site
Description:Gets a site by name
Return codes:
200 - Success
409 - The entity 'Site' with identifier '{name}' was not found"
{ "name" : "", "description" : " ", "city" : { "name" : " ", "country_code" : "CODE", "latitude" : , "longitude" : }, "JPDs" : [ { "name" : " ", "type" : " " }] }
Example:
In this example, information regarding Site named 'China' is being retrieved. If site 'China' exists200 Successwill be returned
$ curl -XGET 'http://localhost:8080/api/v1/sites/China' -uadmin:password
{ "name": "Beijing", "description": "Beijing Data Center", "city": { "name": "Beijing", "country_code": "CN", "latitude": 39.907500, "longitude": 116.397230 }, "JPDs": [ { "name": "arti-beijing", "type": "ARTIFACTORY" } ] } 200 Success
Get Site List
Description:Gets a list of all sites
Return codes:
200 - Success
409 - The entity 'Site' with identifier '
[{ "name" : "", "description" : " ", "city" : { "name" : " ", "country_code" : "CODE", "latitude" : , "longitude" : }, "JPDs" : [ { "name" : " ", "type" : " " }] }]
Example:
$ curl -XGET 'http://localhost:8080/api/v1/sites' -uadmin:password
[ { "name": "China", "description": "", "city": { "name": "Shanghai", "country_code": "CN", "latitude": 31.22222, "longitude": 121.45806 }, "JPDs": [ { "name": "China", "type": "ARTIFACTORY" } ] }, { "name": "Argentina", "description": "", "city": { "name": "Buenos Aires", "country_code": "AR", "latitude": -34.61315, "longitude": -58.37723 }, "JPDs": [ { "name": "Source Local", "type": "ARTIFACTORY" } ] } ] 200 Success
Delete Site
Description:Delete a site
200 - Success
409 - Cannot delete site {name}, it has non-empty JPD(s): {name of the JPD}
Example:
$ curl -XDELETE 'http://localhost:8080/api/v1/sites/China' -uadmin:password -H "Content-Type: application/json"
JPDS
Create JPD
Description:Creates a new JPD.
Return codes:
201 - Created
409 -Failed to connect to the JPD. Please verify that the JPD information provided is correct
{ "name" : "", "description" : " ", "url" : " ", "username" : " ", "password" : " ", "type" : " " "site_name" : " , "auth_token": " ", "pair_with_auth_provider" : " ", "auth_provider" : " " }
Example:
$ curl 'http://localhost:8080/api/v1/JPDs' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createJPD.json
{" name ": " dev-west”、“描述”:“Artifactory serving development in West region", "url" : "https://artifactory-west.acme.com/artifactory", "username" : "admin", "password" : "password", "type" : "ARTIFACTORY" } 201 Created
Update JPD
Description:Updates a JPD
Return codes:
204 - No Content
409 - Url
{ "name" : "", "description" : " ", "url" : " ", "username" : " ", "password" : " " }
Example:
$ curl 'http://localhost:8080/api/v1/JPDs/dev-west' -i -u 'admin:password' -X PUT -H 'Content-Type: application/json; charset=UTF-8' -T updateJPD.json
{" name ": " dev-east”、“描述”:“Artifactory serving development in East region", "url" : "https://artifactory-east.acme.com/artifactory", "username" : "admin", "password" : "password" } 204 No Content
Get JPD List
Description:Get a list of all JPDs
Example:
$ curl -XGET 'http://localhost:8080/api/v1/JPDs' -uadmin:password
[ { "name": "Argentina", "description" : "Artifactory serving development in Argentina", "url": "http://10.0.0.8:8082/artifactory", "type": "ARTIFACTORY", "JPD_type": "jfrt", "JPD_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", "JPD_type": "jfrt", "JPD_id": "jfrt@01cdmdjarccxy009wnzmwf06jp", "site": { "city": { "country_code": "CN", "latitude": 31.22222, "longitude": 121.45806, "name": "Shanghai" }, "description": "", "name": "China" } } ] 200 Success
Get List of JPDs with Proxy Based on Source
Example:
GET /api/v1/JPDs?source=Source%20Artifactory%20Name HTTP/1.1 [ { "name" : "Source Artifactory Name", "url" : "http://Source Artifactory Name.com/artifactory", "type" : "ARTIFACTORY", "JPD_type" : "jfrt", "JPD_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", "JPD_type" : "jfrt", "JPD_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 JPD by Name with Proxy based on Source
Example:
GET /api/v1/JPDs/jfrt%4001crqgh6fyxtpn1eyddfwa1hk1?source=Source%20Artifactory%20Name { "name" : "Destination Artifactory Name", "url" : "http://Destination Artifactory Name.com/artifactory", "type" : "ARTIFACTORY", "JPD_type" : "jfrt", "JPD_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 JPD
Description:Deletes a JPD
200 - Success
Example:
$ curl -XDELETE 'http://localhost:8080/api/v1/JPDs/Argentina' -uadmin:password -H "Content-Type: application/json"
Get Repository List
Description:Gets the list of repositories in the specified Artifactory JPD
200 - Success
Example:
$ curl -XGET 'http://localhost:8080/api/v1/JPDs/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 JPD
Description:Gets the Access Federation configuration for a specific JDPD. Returns the Federation targets configured for the provided JPD.
200 - Success
400 - The JPD is not a valid Access Federation candidate.
404 - The JPD was not found or it is not an Artifactory.
Consumes:application/json
Request Example:
GET /api/v1/JPDs/access/JPD-1/federation HTTP/1.1
Response Example:
{ "entities" : [ "GROUPS", "USERS" ], "targets" : [ { "name" : "JFP-2", "code" : "access2JPDId", "url" : "http://localhost:37837" } ] }
Get Access Federation Configuration for All JPDs
Description:Gets the Access Federation configurations for all the JPDs.
200 - Success
Request Example:
GET /api/v1/JPDs/access/federation?include_non_configured=false HTTP/1.1
Response Example:
[ { "source" : "artifactory1", "entities" : [ "GROUPS", "USERS" ], "targets" : [ { "name" : "JPD-2", "code" : "access2JPDId", "url" : "url2" } ] } ]
Configure Access Federation on a JPD
Description:Configures Access Federation for a specific Artifactory JPD. 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/JPDs/access/{JPDName}/federation
400, 422 - Invalid input
404 - JPD not found or not an Artifactory
Example Request:
PUT /api/v1/JPDs/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 JPD.
Since:3.3
Security:Requires an admin user
Usage:GET /api/v1/JPDs/access/federation/candidates
200 - Success
Request Example:
GET /api/v1/JPDs/access/federation/candidates HTTP/1.1
Response Example:
["JPD name 1", "JPD 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/JPDs/access/federation/create_mesh
Return codes:
400, 422 - Invalid input
404 - JPD not found or not an Artifactory
Request Example:
POST /api/v1/JPDs/access/federation/create_mesh HTTP/1.1
Response Example:
{ "JPDs": [ "JPD name 1", "JPD 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-JPD-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 247 { "id" : "SUPP20180912154413548991", "artifactory" : { "JPD_id" : "jfrt@4754684682741", "bundle_url" : "http://artifactory.www.si-fil.com/artifactory/jfrog-support-bundle/SUPP20180912154413548991/jfmc/test_JPD } }
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" : { "JPD_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 JPDs
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 - JPD 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", "JPDs" : [ "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-JPD-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" : [ { "JPD_id" : "jfrt@01d612nxv8yfcn119xsj7d1jrz", "artifactory" : { "JPD_id" : "jfrt@other.www.si-fil.com", "bundle_url" : "http://other.www.si-fil.com/artifactory/" } }, { "JPD_id" : "jfmc@01c7b8rg70nrqr1cck7k4x0yp7", "artifactory" : { "JPD_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 Content-Type: application/json X-JFrog-JPD-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 /平台/支持/包/ 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 Content-Type: application/json X-JFrog-JPD-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" : [ { "JPD_id" : "jfxr@2222", "artifactory" : { "JPD_id" : "jfrt@jfxr", "bundle_url" : "https://art.jfxr" } }, { "JPD_id" : "jfds@1111", "artifactory" : { "JPD_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 /平台/支持/包/ 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-JPD-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 28
Delete Platform Support Bundle
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 Content-Type: application/json X-JFrog-JPD-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 /桶({" id ": " 12345 ", "名称":"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 /巴克ets/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 the specified bucket to the specified Artifactory JPD.
{ "JPD_name" : "Artifactory JPD name", "deploy" :}
Produces:application/json
{ "license_key" : "" }
200 - Success
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
{ "JPD_name" : "JPDName", "deploy" : false }
{ "license_key" : "" }
Attach License Artifactory 5.x HA
Description:Attaches a number of licenses from the specified bucket to an Artifactory 5.x HA cluster.
{ "number_of_licenses" : 5, "JPD_name" : "", "deploy" : < false | true > }
200 - Success
409 - "Deployment of multiple license is supported for cluster only"
Example:
$ 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, "JPD_name" : "JPDName", "deploy" : false }