Cloud customer?
Start for Free>
Upgrade in MyJFrog >
What's New in Cloud >







You are viewing an old version of this page. View thecurrent version.

Compare with CurrentView Page History

« PreviousVersion 25Next »

Overview

Mission Control exposes a rich REST API to allow fully automated management of registered JFrog Platform Deployments (JPDs).

This provides a convenient and up-to-date self-descriptive API and can be used by various tools to automate administration and configuration actions.

Authentication

Mission Control's REST API supports authentication types:

Type Description
Access Token

Users have to use access token as a bearer token in the authorization header.

Example of authentication using the Bearer token:

    1. Create the Access Token to use for MC:

      http --form POST http:///access/api/v1/oauth/token "username=" scope="applied-permissions/user" "audience=jfmc@*" "expires_in=0" "refreshable=true" "grant_type=client_credentials" "Authorization: Bearer

    2. Run curl -H 'Authorization: Bearer http://localhost:8081/mc/api/v1/jpds


Usage

Mission Control REST API can be invoked in any of the standard ways for a REST API.The following section describes how to use the Mission Control REST API using cURL as an example.

Using and configuring cURL

You can download cURL here. Learn how to use and configure cURL here.

Example - Create JPD

The example below demonstrates how to invoke the create userREST API.

  • You have MissionControl running on your local system, on port 8080

  • You wish to create a site called "us-west" containing both anArtifactory and Xray.

  • You created a file with the site's parameters calledcreatejpd.json

To use the file to create a new user, you would use the following command:

Using cURL with the REST API
$ curl 'http://localhost:8081/mc/api/v1/jpds' -i -H 'Authorization: Bearer ' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createjpd.json
The file createsite.json will contain the following :
{ "name": "us-west", "url" : "http://somehost", "token" : "xxx", "location": { "city": "Sunnyvale", "country_code": "US", "latitude": 37.368830, "longitude": -122.036350 } }
Page Contents

Read More


SYSTEM

System Health Check

Description: Get an indication if Mission Control is running or not. No authentication required.
Since:4.0
Usage:GET /api/v1/ping
Example:

GET /api/v1/ping true


PROXIES

Update proxy

Description:Proxies are defined in Artifactory, this request adds a JPD pair to an existing proxy. Those JPDs are referenced with their id, see get JPD call (TODO: link here)

Since:4.0
Security:Requires an admin user
Usage:PUT /api/v1/proxies/

Consumes:application/json


Example:

POST /mc/api/v1/proxies/squid HTTP/1.1 [{ "source" : "JPD-1", "destination" : "JPD-2" }, { "source" : "JPD-1", "destination" : "JPD-3" } ]


Example:


$ curl 'http://localhost:8081/mc/api/v1/proxies' -i -H 'Authorization: Bearer ' -X PUT -H 'Content-Type: application/json; charset=UTF-8' -d '[{ "source" : "JPD-1", "destination" : "JPD-2" }, { "source" : "JPD-1", "destination" : "JPD-3" } ]'



通用电气t List of Proxies

Description:通用电气t the list of proxies.
Since:4.0
Security:Requires an admin user
Usage:通用电气t /api/v1/proxies
Consumes:application/json

Example:


GET /mc/api/v1/proxies HTTP/1.1 [ { "key" : "proxy-01", "host" : "host1", "port" : 3128, "username" : "user", "password" : "xxx", "nt_host" : "host", "nt_domain" : "domain", "jpu_pairs" : [{ "source" : "JPD-1", "destination" : "JPD-2" }] }, { "key" : "proxy-02", "host" : "host1", "port" : 3128, "jpu_pairs" : [{ "source" : "JPD-1", "destination" : "JPD-3" }] } ]


Command line:


$ curl 'http://localhost:8081/mc/api/v1/proxies' -i -H 'Authorization: Bearer ' -H 'Content-Type: application/json; charset=UTF-8'



通用电气t List of Proxies Filtered by Source JPD

Description:通用电气t the list of proxies by source JPD.
Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/proxies?source={JPD_name}
Consumes:application/json


Example:


GET /mc/api/v1/proxies?source=JPD-12 HTTP/1.1 [ { "key" : "proxy-01", "host" : "host1", "port" : 3128, "jpu_pairs" : [{ "source" : "JPD-12", "destination" : "JPD-3" }] } ]



通用电气t List of Proxies Filtered by Destination JPD


Description:通用电气t the list of proxies filtered by destination JPD.
Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/proxies?destination={destination_JPD_name}
Consumes:application/json

Example:


GET /mc/api/v1/proxies?destination=JPD-12 HTTP/1.1 [ { "key" : "proxy-03", "host" : "host3", "port" : 3128, "jpu_pairs" : [{ "source" : "JPD-1", "destination" : "JPD-12" }] } ]



通用电气t List of Proxies Filtered by Source and Destination JPD

Description:通用电气t the list of proxies by source JPD.
Since:3.2
Security:Requires an admin user
Usage:GET /mc/api/v1/proxies?source={source_JPD_name}&destination={destination_JPD_name}
Consumes:application/json

Example:


GET /mc/api/v1/proxies?source=JPD-12&destination=JDP-13 [ { "key" : "proxy-04", "host" : "host4", "port" : 3128, "jpu_pairs" : [{ "source" : "JPD-12", "destination" : "JPD-13" }] } ]



通用电气t Proxy by Name


Description:通用电气t a proxy by name.
Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/proxies/{name}
Consumes:application/json


Example:

GET /mc/api/v1/proxies/proxy-01 HTTP/1.1 { "key" : "proxy-01", "host" : "host1", "port" : 3128, "jpu_pairs" : [{ "source" : "JPD-1", "destination" : "JPD-3" }] }



SITES (Deprecated)

These are the relevant fields when configuring sites:

Field Type Optional Description

name

String false Site's name
description String true Site's description
城市 Object false Site's city
城市.name String true City's name
城市.country_code String true City's country code
城市.longitude Number false City's longitude
城市.latitude Number false City's latitude
services Array true Names of services

Create Site (Deprecated)

Description:Create a new site.
笔记:This API isdeprecatedfrom version 4.x.
Since:2.0
Security:Requires an admin user
Usage:POST /api/v3/sites

Return codes:

201 - No Content
400 -Couldn't find service(s) with following name(s):, '', ''

409 -Name '<Site name>' already exists.
Consumes:application/json

{ "name" : "", "description" : "", "city" : { "name" : "", "country_code" : "", "latitude" : , "longitude" :  }, "services" : [ "" ] }

Example:
在这个示例中,创建一个新的森尼维耳市的网站nd services "arti-west" and "xray-west" are associated with the new site. If the services exist,201 Createdwill be returned.

$ curl 'http://localhost:8080/api/v3/sites' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createsite.json
createsite.json
{ "name": "us-west", "description": "US West coast site", "city": { "name": "Sunnyvale", "country_code": "US", "latitude": 37.368830, "longitude": -122.036350 }, "services": ["arti-west", "xray-west"] }


Update Site (Deprecated)

Description: Updates an exiting site by name.
笔记:This API isdeprecatedfrom version 4.x.
Since:2.0
Security: Requires an admin user
Usage: PUT /api/v3/sites/{name}

Return codes:

204 - No Content
409 - The entity 'Site' with identifier '' was not found
Consumes:application/json



                       

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


                       
updatesite.json

                       


Partial Update Site By Name (Deprecated)

Description:Updates a sitewithout updating the attributes.
笔记:This API isdeprecatedfrom version 4.x.
Since:2.1
Security:Requires an admin user
Usage:PUT /api/v3/services/{name}

Return codes:

204 - No Content
Consumes:application/json


                       

Example:


                       

Example:


                       



通用电气t Site (Deprecated)

Description:通用电气ts a site by name

笔记:This API isdeprecatedfrom version 4.x.
Since:2.0
Security:Requires an admin user
Usage:GET /api/v3/sites/{name}

Return codes:

200 - Success
409 - The entity 'Site' with identifier '{name}' was not found"
Produces:application/json


                       

Example:

In this example, information regarding Site named 'China' is being retrieved. If site 'China' exists200 Successwill be returned


                       
example output

                       


通用电气t Site List (Deprecated)

Description:通用电气ts a list of all sites
笔记:This API isdeprecatedfrom version 4.x.
Since:2.0
Security:Requires an admin user
Usage:GET /api/v3/sites/

Return codes:

200 - Success
409 - The entity 'Site' with identifier '' was not found
Produces:application/json


                       

Example:


                       
example output

                       

Delete Site (Deprecated)


Description: Delete a site
笔记: This API is deprecated from version 4.x.
Since:2.0
Security:Requires an admin user
Usage:DELETE /api/v3/sites/{name}
Return codes:

200 - Success
409 - Cannot delete site {name}, it has non-empty service(s): {name of the service}

Example:


                       



SERVICES (Deprecated)

Create Service (Deprecated)

Description:Creates a new service.

笔记:This API isdeprecatedfrom version 4.x.
Since: 2.0. Updated in 3.2 with additional attributes
Security:Requires an admin user
Usage:POST /api/v3/services
Return codes:

201 - Created
409 -Failed to connect to the service. Please verify that the service information provided is correct
Consumes:application/json


{ "name" : "", "description" : "", "url" : "", "username" : "", "password" : "", "type" : "" "site_name" : ", "auth_token": "", "pair_with_auth_provider" : "", "auth_provider" : "" }


Example:

$ curl 'http://localhost:8080/api/v3/services' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createservice.json
createservice.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 Service (Deprecated|)


Description: Updates a service
笔记:This API isdeprecatedfrom version 4.x.
Since:2.0
Security:Requires an admin user
Usage:PUT /api/v3/services/{name}
Return codes:

204 - No Content
409 - Url already exists
Consumes:application/json

{ "name" : "", "description" : "", "url" : "", "username" : "", "password" : "" }

Example:

$ curl 'http://localhost:8080/api/v3/services/dev-west' -i -u 'admin:password' -X PUT -H 'Content-Type: application/json; charset=UTF-8' -T updateservice.json
updateservice.json
{ "name" : "dev-east", "description" : "Artifactory serving development in East region", "url" : "https://artifactory-east.acme.com/artifactory", "username" : "admin", "password" : "password" } 204 No Content


通用电气t Service List (Deprecated)


Description:通用电气t a list of all services
笔记:This API isdeprecatedfrom version 4.x.
Since:2.0
Security:Requires an admin user
Usage:GET /api/v3/services/
Produces:application/json

Example:
$ curl -XGET 'http://localhost:8080/api/v3/services' -uadmin:password
example output
[ { "name": "Argentina", "description" : "Artifactory serving development in Argentina", "url": "http://10.0.0.8:8082/artifactory", "type": "ARTIFACTORY", "service_type": "jfrt", "service_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", "service_type": "jfrt", "service_id": "jfrt@01cdmdjarccxy009wnzmwf06jp", "site": { "city": { "country_code": "CN", "latitude": 31.22222, "longitude": 121.45806, "name": "Shanghai" }, "description": "", "name": "China" } } ] 200 Success

通用电气t List of Services with Proxy Based on Source (Deprecated)


Description: 通用电气ts the list of services managed by Mission Control with proxy
笔记: This API is deprecated from version 4.x.
Since: 3.2
Security:
Requires an admin user
Usage:
GET request to /api/v3/services?source=SourceConsumes: application/json

Example:
GET /api/v3/services?source=Source%20Artifactory%20Name HTTP/1.1 [ { "name" : "Source Artifactory Name", "url" : "http://Source Artifactory Name.com/artifactory", "type" : "ARTIFACTORY", "service_type" : "jfrt", "service_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", "service_type" : "jfrt", "service_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" } } ]


通用电气t Service by Name with Proxy based on Source (Deprecated)


Description:通用电气t service by name managed by Mission Control with proxy.

笔记:This API isdeprecatedfrom version 4.x.
Since:
3.2
Security:
Requires an admin user
Usage:
GET /api/v3/services/{name}

Example:

GET /api/v3/services/jfrt%4001crqgh6fyxtpn1eyddfwa1hk1?source=Source%20Artifactory%20Name { "name" : "Destination Artifactory Name", "url" : "http://Destination Artifactory Name.com/artifactory", "type" : "ARTIFACTORY", "service_type" : "jfrt", "service_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 Service (Deprecated)

Description:Deletes a service
笔记:This API isdeprecatedfrom version 4.x.
Since:
2.0
Security:Requires an admin user
Usage:DELETE /api/v3/services/{name}
Return codes:

200 - Success

Example:

$ curl -XDELETE 'http://localhost:8080/api/v3/services/Argentina' -uadmin:password -H "Content-Type: application/json"

通用电气t Repository List (Deprecated)


Description:通用电气ts the list of repositories in the specified Artifactory service
笔记: This API is deprecated from version 4.x.
Since:
2.0
Security:Requires an admin user
Usage:GETapi/v3/services/artifactory/{name}/repositories
Return codes:

200 - Success

409 - Could not find Artifactory instance with name
Consumes: application/json

Example:

$ curl -XGET 'http://localhost:8080/api/v3/services/artifactory/{name}/repositories' -uadmin:password
example output
[ { "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" } ]



JPDs

Add JPD

Description:Adds a new JPD to Mission Control.

Since:4.0
Security:Requires an admin user
Usage:POST/mc/api/v1/jpd s

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" : "JDP-12", "url" : "http://jpd: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:8081/mc/api/v1/jpds' -i -H 'Authorization: Bearer ' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T create_JPD.json



create_JPD.json
{ "name" : "dev-west", "url" : "https://artifactory-west.acme.com/artifactory", "token" : "", "location" : { "city_name" : "San Francisco", "country_code" : "US", "latitude" : 37.7749, "longitude" : 122.4194 }, "proxy_key" : "proxy1" } 201 Created


Update JPD

Description:Updates a JPD

Since:4.0
Security:Requires an admin user
Usage:PUT /mc/api/v1/jpds/{name}

Return codes:

204 - No Content
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 ":“<詹妮弗名称>”,“url”:“<詹妮弗url >”,“托托en" : "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/jpds/JPD-3' -i -X -H 'Authorization: Bearer ' PUT \



updateservice.json
{ "name" : "new_name", "url" : "http://new-jpd-url:8080/jpd.test", "location" : { "city_name" : "Toulouse", "country_code" : "FR", "latitude" : 43.6043, "longitude" : 1.4437 }, "proxy_key" : "proxy1" }


通用电气t JPD List

Description:通用电气t a list of all JPDs

Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/jpds/
Produces:application/json

Example:

$ curl -XGET 'http://localhost:8080/mc/api/v1/jpds' -H 'Authorization: Bearer '



example output
[ { "name" : "JDP-12", "url" : "http://jpd12:8080/test", "location" : { "city_name" : "San Francisco", "country_code" : "US", "latitude" : 37.7749, "longitude" : 122.4194 }, "proxy_key" : "proxy1" }, { "name" : "JDP-13", "url" : "http://jpd13:8080/test", "location" : { "city_name" : "San Francisco", "country_code" : "US", "latitude" : 37.7749, "longitude" : 122.4194 }, "proxy_key" : "proxy1" } ] 200 Success

通用电气t List of JPDs with Proxy Based on Source


Description:通用电气ts the list of JPDs managed by Mission Control with proxy
Since:4.0
Security:Requires an admin user
Usage:GET request to /mc/api/v1/jpds?source=Source
Consumes:application/json

Example:


[ { "name" : "JDP-12", "url" : "http://jpd12:8080/test", "location" : { "city_name" : "San Francisco", "country_code" : "US", "latitude" : 37.7749, "longitude" : 122.4194 }, "proxy_key" : "proxy1" }, { "name" : "JDP-13", "url" : "http://jpd13:8080/test", "location" : { "city_name" : "San Francisco", "country_code" : "US", "latitude" : 37.7749, "longitude" : 122.4194 }, "proxy_key" : "proxy1" } ] 200 Success


通用电气t JPD by Name with Proxy based on Source


Description:通用电气t JPD by name managed by Mission Control with proxy.
Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/jpds/{name}?source=

Example:


GET /api/v1/jpds/JPD-12?source=JPD-13 { "name" : "JDP-13", "url" : "http://jpd13:8080/test", "location" : { "city_name" : "San Francisco", "country_code" : "US", "latitude" : 37.7749, "longitude" : 122.4194 }, "proxy_key" : "proxy1" }



Delete JPD

Description:Removes a JPD from Mission Control

Since:4.0
Security:Requires an admin user
Usage:DELETE/mc/api/v1/jpds/{id}
Return codes:

200 - Success
204 - No content
404 - Not found

Example:

$ curl 'http://localhost:8081/mc/api/v1/jpds/JPD-321' -i -X DELETE \




ACCESS FEDERATION

通用电气t Access Federation Configuration for a Single JPD

Description:通用电气ts the Access Federation configuration for a specific JPD. Returns the Federation targets configured for the provided JPD.

Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/federation/{JPD ID}
Return codes:

200 - Success
400 - The JPD is not a valid Access Federation candidate.
404 - The JPD was not found.
Consumes:application/json


Request Example:

GET /mc/api/v1/federation/JPD-1 HTTP/1.1

反应的例子:

{ "entities" : [ "GROUPS", "USERS" ], "targets" : [ { "name" : "JFP-2", "code" : "access2JPDId", "url" : "http://localhost:37837/access" } ] }



通用电气t Access Federation Configuration for All JPDs

Description:通用电气ts the Access Federation configurations for all the JPDs.

Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/jpds/federation?includeNonConfiguredJPDs=false
Return codes:

200 - Success

Produces:application/json


Request Example:

GET /mc/api/v1/federation?include_non_configured=false HTTP/1.1

反应的例子:

[ { "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 JPD. As a pre-requisite, the source and targets must have been configured properly for Access Federation based onthis.
Since:4.0
Security:Requires an admin user
Usage:PUT /mc/api/v1/jpds/{JPD ID}/federation

Return codes:
200 - Success
400, 422 - Invalid input
404 - JPD not found or not an Artifactory


Example Request:

PUT /mc/api/v1/federation/JPD-12 HTTP/1.1 { "entities" : [ "USERS", "GROUPS" ], "targets" : [ { "name" : "artifactory2", "url" : "http://localhost:8080/access" } ] }

Example Response:

[{“标签”:“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" } ]

通用电气t Access Federation Candidates

Description:通用电气ts the Access Federation candidates.
Since:4.0
Security:Requires an admin user
Usage:GET /mc/api/v1/federation/candidates

Return codes:
200 - Success

Request Example:

GET /mc/api/v1/federation/candidates HTTP/1.1

反应的例子:

["JPD-12", "JPD-13"]



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:4.0
Security:Requires an admin user
Usage:POST /mc/api/v1/federation/create_mesh
Return codes:

200 - Success
400, 422 - Invalid input
404 - JPD not found or not an Artifactory

Request Example:

POST / mc / api / v1 /联合会/ create_mesh HTTP / 1.1

反应的例子:

{ "jpds": [ "JPD-12", "JPD-13" ], "entities": [ "USERS", "GROUPS", "PERMISSIONS", "TOKENS" ] }

MONITORING (Deprecated)

通用电气t Services Status (Deprecated)

Description: Get status of all services
笔记:This API isdeprecatedfrom version 4.x.
Since: 2.0
Usage: GET /api/v3/services/monitoring/status
Return codes:

200 - Success

Produces: application/json

[ { "service_name": "", "up_time_in_sec": 

Example:

$ curl -XGET 'http://localhost:8080/api/v3/services/monitoring/status' -uadmin:password

Example output

[ { "service_name": "China", "up_time_in_sec": 29282, "service_state": "ONLINE" }, { "service_name": "Argentina", "up_time_in_sec": 131, "service_state": "ONLINE" } ]



通用电气t Service Status (Deprecated)


Description: Get status of the specified service
笔记:This API isdeprecatedfrom version 4.x.
Since: 2.0
Usage: GET /api/v3/services/{name}/monitoring/status
Return codes:

200 - Success
409 - Could not find service with name
Produces: application/json

{ "service_name": "", "up_time_in_sec": 

Example:

$ curl -XGET 'http://localhost:8080/api/v3/services/China/monitoring/status' -uadmin:password

Example output

{ "service_name": "China", "up_time_in_sec": 46182, "service_state": "ONLINE" }


SUPPORT

Create Support Bundle

Description: Create a new support bundle.
Since:4.0
Security:Requires an admin user
笔记: All bundle items are optional.
Usage: POST /mc/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 /mc/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 -H 'Authorization: Bearer ' 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 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 247 { "id" : "SUPP20180912154413548991", "artifactory" : { "service_id" : "jfrt@4754684682741", "bundle_url" : "http://artifactory.www.si-fil.com/artifactory/jfrog-support-bundle/SUPP20180912154413548991/jfmc/test_JPD } }

通用电气t Support Bundles List

Description: Get the list of available support bundles.
Since:4.0
Security:Requires an admin user
Usage: GET /mc/api/v1/system/support/bundles

Return codes:
200 - Successful
403 - Unauthorized

Example:


GET /mc/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" } ] }



通用电气t Details of a Support Bundle

Description:被一个特定的细节支持包。
Since:4.0
Security:Requires an admin user
Usage: GET /mc/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 /mc/api/v1/system/support/bundle/SUPP20180912154413548991 HTTP/1.1

Response:


{ "name" : "issue #1234", "description" : "Support bundle created for issue #1234 investigation", "artifactory" : { "service_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:下载支持包一个ZIP文件。
Since:4.0
Security:Requires an admin user.You need to have the "Download folder" permission enabled on Artifactory.
Usage: GET /mc/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 /mc/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:4.0
Security:Requires an admin user
Usage: DELETE /mc/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 /mc/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:4.0
Security:Requires an admin user
Usage: POST /mc/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 /mc/api/v1/system/support/bundle HTTP/1.1 { "name" : "my_support_bundle", "description" : "Platform Support Bundle test description", "services" : [ "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:

example output
200 OK Content-Type: application/json Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 487 { "id" : "20190315-1624-cab48ff6-33e4-4e17-b2c9-845a71ffa3a7", "locations" : [ { "service_id" : "jfrt@01d612nxv8yfcn119xsj7d1jrz", "artifactory" : { "service_id" : "jfrt@other.www.si-fil.com", "bundle_url" : "http://other.www.si-fil.com/artifactory/" } }, { "service_id" : "jfmc@01c7b8rg70nrqr1cck7k4x0yp7", "artifactory" : { "service_id" : "jfrt@auth-provider.www.si-fil.com", "bundle_url" : "http://auth-provider.www.si-fil.com/artifactory/" } } ] }

通用电气t Platform Support Bundles List

Description: Gets a list of previously created support bundles.
Since:4.0
Security:Requires an admin user
Usage: GET /mc/api/v1/platform/support/bundles

Return codes:

200 - OK
400 - Invalid Request

Sample Usage:

GET /mc/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 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 }


通用电气t Platform Support Bundle Metadata

Description: Gets the metadata for a previously created support bundle.
Since:3.5
Security:Requires an admin user
Usage: GET /mc/api/v1/system/support/bundle/{id}

Return codes:

200 - OK
400 - Invalid Request

Sample Usage:

GET /mc/api/v1/platform/support/bundle/20190218-1554-88722539-78af-41bc-a5d7-e7567fb7189f HTTP/1.1 Authorization: Bearer xxx Content-Type: application/json; charset=UTF-8 Host: localhost:8081

Example Output:

HTTP/1.1 200 OK Content-Type: application/json 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" : [ { "service_id" : "jfxr@2222", "artifactory" : { "service_id" : "jfrt@jfxr", "bundle_url" : "https://art.jfxr" } }, { "service_id" : "jfds@1111", "artifactory" : { "service_id" : "jfrt@jfds", "bundle_url" : "https://arti.jfds" } } ] }

通用电气t Platform Support Bundle

Description: Downloads a previously created support bundle as a ZIP file.
Since:4.0
Security:Requires an admin user
Usage: GET /mc/api/v1/platform/support/bundle/{id}/archive

Return codes:

200 - Support bundle zip will be downloaded
400 - Invalid Request

Sample Usage:

GET /mc/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:8081

Example Output:

HTTP/1.1 200 OK Content-Disposition: attachment; filename="20190218-1553-2ea5aa8c-0ee7-4981-9028-d19c653b423a.zip" Content-Type: application/zip 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:4.0
Security:Requires an admin user
Usage: DELETE /mc/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 /mc/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:8081

Example Output:

HTTP/1.1 200 OK Content-Type: application/json Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 110 { "deleted" : [ "jfmc@01c7b8rg70nrqr1cck7k4x0yp7", "jfrt@01d612qkz4bjqt0e36d13s1ry5" ], "failures" : [ ] }

DISASTER RECOVERY (Deprecated)

Create DR Pair (Deprecated)


Description : Matches up a Master and Target Artifactory service as a DR pair.
笔记: This API is deprecated from version 4.x.
Since:
2.0
Security: Requires an admin user
Usage: POST /api/v3/dr-configs
Consumes: application/json
{ "source" : "", "target" : "" }

Produces:application/json

{ "active": "NONE", "dr_replications_enabled": , "state": "NONE" }

Example:

$ curl -X POST 'http://localhost:8080/api/v3/dr-configs' -i -u 'admin:password' -H 'Content-Type: application/json; charset=UTF-8' -T createdr.json
createdr.json
{ "source" : "Mexico", "target" : "China" }


Example return:

Example return
{ "active": "NONE", "dr_replications_enabled": false, "state": "NONE" }



SCRIPTS (Deprecated)

通用电气t Scripts (Deprecated)

Description:通用电气t a list of all scripts
笔记:This API isdeprecatedfrom version 4.x.
Since:2.0
Security:Requires an admin user
Usage:GET/api/v3/scripts

Return codes:

200 - Success

Produces:application/json

[ { "name" : "