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 2Next »

Overview

Mission Control exposes a rich REST API to allow fully automated management of registered Platform Units.

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
Basic If no Authentication provider is set, use your username and password. Or using local admin to execute REST APIs.
Access Token

If Authentication provider is set, 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.
    2. Run curl -H 'Authorization: Bearer [token]http://localhost:8080/api/v3/services


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

你可以download cURL here. Learn how to use and configure cURL here.

Example - Create Site

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 service

  • You created a file with the site's parameters calledcreatesite.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:8080/api/v3/sites' -i -u 'admin:password' -X POST -H 'Content-Type: application/json; charset=UTF-8' -T createsite.json
The file createsite.json will contain the following :
{ "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"] }
Page Contents

Read More


SYSTEM

System Health Check

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

GET /api/v3/ping true

PROXIES

Create Proxy

Description:Adds a proxy.

Since:3.2
Security:Requires an admin user
Usage:POST /api/v3/proxies

Consumes:application/json


Example:

POST /api/v3/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 / v3 /代理”-我-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/v3/proxies
Consumes:application/json


Example:

POST /api/v3/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/v3/proxies/{name}
Consumes:application/json

Example:


PUT /api/v3/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/v3/proxies
Consumes:application/json

Example:


GET /api/v3/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 / v3 /代理”-我-u 'admin:password' -H 'Content-Type: application/json; charset=UTF-8'



Get List of Proxies Filtered by Source Service

Description:Get the list of proxies by source service.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v3/proxies?src_service={service_name}
Consumes:application/json


Example:


GET /api/v3/proxies?src_service=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 Service


Description:Get the list of proxies filtered by destination service.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v3/proxies?dest_service={destination_service_name}
Consumes:application/json

Example:


GET /api/v3/proxies?dest_service=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 Service

Description:Get the list of proxies by source service.
Since:3.2
Security:Requires an admin user
Usage:GET /api/v3/proxies?src_service={source_service_name}&dest_service={destination_service_name}
Consumes:application/json

Example:


GET /api/v3/proxies?src_service=source-artifactory&dest_service=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/v3/proxies/{name}
Consumes:application/json


Example:

GET /api/v3/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/v3/proxies/{name}
Consumes:application/json

Example:


DELETE /api/v3/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
services Array true Names of services

Create Site

Description:Create a new site.

Since:2.0
Security:Requires an admin user
Usage:POST /api/v3/sites

Return codes:

201 - No Content
400 -找不到服务(s)名称(s):,'', ''

409 -Name '<Site name>' already exists.

Consumes:application/json


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


Example:
In this example, a new Sunnyvale site is created and 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

Description: Updates an exiting site by name.

Since: 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


{ "name" : "", "description" : "", "city" : { "name" : "", "country_code" : "", "latitude" : , "longitude" :  }, "services" : [ { "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/v3/sites/Argentina' -i -u 'admin:password' -H 'Content-Type: application/json; charset=UTF-8' -T updatesite.json
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

Security:Requires an admin user
Usage:PUT /api/v3/services/{name}

Return codes:

204 - No Content
Consumes:application/json


PATCH /api/v3/sites/{name}

Example:

PATCH /api/v3/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", "services" : [ "Artifactory name" ] } HTTP/1.1 204 No Content

Example:

$ curl 'http://localhost:8080/api/v3/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", "services" : [ "Artifactory name" ] }'



Get Site

Description:Gets a site by name

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


{ "name" : "", "description" : "", "city" : { "name" : "", "country_code" : "CODE", "latitude" : , "longitude" :  }, "services" : [ { "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/v3/sites/China' -uadmin:password



example output
{ "name": "Beijing", "description": "Beijing Data Center", "city": { "name": "Beijing", "country_code": "CN", "latitude": 39.907500, "longitude": 116.397230 }, "services": [ { "name": "arti-beijing", "type": "ARTIFACTORY" } ] } 200 Success

Get Site List

Description:Gets a list of all sites

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


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


Example:

$ curl -XGET 'http://localhost:8080/api/v3/sites' -uadmin:password



example output
[ { "name": "China", "description": "", "city": { "name": "Shanghai", "country_code": "CN", "latitude": 31.22222, "longitude": 121.45806 }, "services": [ { "name": "China", "type": "ARTIFACTORY" } ] }, { "name": "Argentina", "description": "", "city": { "name": "Buenos Aires", "country_code": "AR", "latitude": -34.61315, "longitude": -58.37723 }, "services": [ { "name": "Source Local", "type": "ARTIFACTORY" } ] } ] 200 Success


Delete Site

Description:Delete a site

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:

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




SERVICES

Create Service

Description:Creates a new service.

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

Description:Updates a service

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


Get Service List

Description:Get a list of all services

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

Get List of Services with Proxy Based on Source


Description:Gets the list of services managed by Mission Control with proxy
Since:3.2
Security:Requires an admin user
Usage:GET request to /api/v3/services?source=Source
Consumes: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" } } ]


Get Service by Name with Proxy based on Source


Description:Get service by name managed by Mission Controlwithproxy.
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

Description:Deletes a service

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"



Get Repository List

Description:Gets the list of repositories in the specified Artifactory service

Since:2.0
Security:Requires an admin user
Usage:GETapi / v3 /服务/ artifactory /{名称}/存储库
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" } ]



ACCESS FEDERATION

Get Access Federation Configuration for a Single Service

Description:Gets the Access Federation configuration for a specific service. Returns the Federation targets configured for the provided service.

Since:3.3
Security:Requires an admin user
Usage:GET /api/v3/services/access/{serviceName}/federation
Return codes:

200 - Success
400 - The service is not a valid Access Federation candidate.
404 - The service was not found or it is not an Artifactory.
Consumes:application/json


Request Example:

GET /api/v3/services/access/artifactory1/federation HTTP/1.1

反应的例子:

{ "entities" : [ "GROUPS", "USERS" ], "targets" : [ { "name" : "artifactory2", "code" : "access2ServiceId", "url" : "http://localhost:37837" } ] }



Get Access Federation Configuration for All Services

Description:Gets the Access Federation configurations for all the services.

Since:3.3
Security:Requires an admin user
Usage:GET /api/v3/services/access/federation?includeNonConfiguredServices=false
Return codes:

200 - Success

Produces:application/json


Request Example:

GET /api/v3/services/access/federation?include_non_configured=false HTTP/1.1

反应的例子:

[ { "source" : "artifactory1", "entities" : [ "GROUPS", "USERS" ], "targets" : [ { "name" : "artifactory2", "code" : "access2ServiceId", "url" : "url2" } ] } ]



Configure Access Federation on a Service

Description:Configures Access Federation for a specific Artifactory service. 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/v3/services/access/{serviceName}/federation

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


Example Request:

把/ api / v3 /服务/访问/ 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 service.
Since:3.3
Security:Requires an admin user
Usage:GET /api/v3/services/access/federation/candidates

Return codes:
200 - Success

Request Example:

GET /api/v3/services/access/federation/candidates HTTP/1.1

反应的例子:

["service name 1", "service 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/v3/services/access/federation/create_mesh
Return codes:

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

Request Example:

POST /api/v3/services/access/federation/create_mesh HTTP/1.1

反应的例子:

{ "services": [ "service name 1", "service name 2" ], "entities": [ "USERS", "GROUPS", "PERMISSIONS", "TOKENS" ] }

MONITORING

得到服务状态

Description: Get status of all services
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" } ] 200 Success

Get Service Status

Description: Get status of the specified service

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" } 200 Success

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/v3/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/v3/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/v3/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-Service-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 247 { "id" : "SUPP20180912154413548991", "artifactory" : { "service_id" : "jfrt@12d0hodgwb0bz427ldnyyk22se", "bundle_url" : "http://artifactory.www.si-fil.com/artifactory/jfrog-support-bundle/SUPP20180912154413548991/jfmc/test_service } }

Get Support Bundles List

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

Return codes:
200 - Successful
403 - Unauthorized

Example:


GET /api/v3/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/v3/system/support/bundle/{id}

Return codes:
200 - Successful
403 - Unauthorized
404 - Supplied ID does not refer to an existing support bundle

Example:

获得/ api / v3 /系统/支持/包/ SUPP20180912154413548991 HTTP/1.1

Response:


{ "name" : "issue #1234", "description" : "Support bundle created for issue #1234 investigation", "artifactory" : { "service_id" : "jfrt@12d0hodgwb0bz427ldnyyk22se", "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/v3/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:

获得/ api / v3 /系统/支持/包/ 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/v3/system/support/bundle/{id}

Return codes:
204 - Successful
403 - Unauthorized
404 - Supplied ID does not refer to an existing support bundle

Example:


DELETE /api/v3/system/support/bundle/SUPP20180912154413548991 HTTP/1.1

Create Platform Support Bundle

Description: Create a new support bundle.create support bundle for several services
Since:3.5
Security:Requires an admin user
Usage: POST /api/v3/platform/support/bundle

Return codes:

200 - Support bundle is being created and will be available soon
422 - Service list empty or too large
504 - Timeout
400 - Invalid Request

Sample Usage:

POST /api/v3/system/support/bundle HTTP/1.1 { "name" : "my_support_bundle", "description" : "Platform Support Bundle test description", "services" : [ "self", "art1" ], "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 X-JFrog-Service-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 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/" } } ] }

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/v3/platform/support/bundles

Return codes:

200 - OK
400 - Invalid Request

Sample Usage:

GET /api/v3/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-Service-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/v3/system/support/bundle/{id}

Return codes:

200 - OK
400 - Invalid Request

Sample Usage:

GET /api/v3/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-Service-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" : [ { "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" } } ] }

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/v3/platform/support/bundle/{id}/archive

Return codes:

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

Sample Usage:

GET /api/v3/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-Service-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/v3/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/v3/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-Service-Id: jfmc@01c7b8rg70nrqr1cck7k4x0yp7 Server: mission-control/SNAPSHOT Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Length: 110 { "deleted" : [ "jfmc@01c7b8rg70nrqr1cck7k4x0yp7", "jfrt@01d612qkz4bjqt0e36d13s1ry5" ], "failures" : [ ] }



DISASTER RECOVERY

Create DR Pair

Description: Matches up a Master and Target Artifactory service as a DR pair.

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

Get Scripts

Description:Get a list of all scripts

Since:2.0
Security:Requires an admin user
Usage:GET/api/v3/scripts
Return codes:

200 - Success

Produces:application/json

[ { "name" : "