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 downloadcURLhere. Learn how to use and configurecURLhere.
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:
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)
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
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: 在这个示例中,创建一个新的森尼维耳市的网站nd services "arti-west" and "xray-west" are associated with the new site. If the services exist,201 Createdwill be returned.
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 isdeprecatedfrom 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
通用电气t List of Services with Proxy Based on Source (Deprecated)
Description:通用电气ts the list of services managed by Mission Control with proxy 笔记:This API isdeprecatedfrom version 4.x. Since: 3.2 Security:Requires an admin user Usage:GET request to /api/v3/services?source=SourceConsumes: application/json
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:
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)
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)
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
Description: Get status of all services 笔记:This API isdeprecatedfrom version 4.x. Since: 2.0 Usage: GET /api/v3/services/monitoring/status Return codes:
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
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
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
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
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
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}
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
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
Description: Matches up a Master and Target Artifactory service as a DR pair. 笔记:This API isdeprecatedfrom version 4.x. Since:2.0 Security: Requires an admin user Usage: POST /api/v3/dr-configs Consumes: application/json