Delete All Deployments in a Deployment Environment

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameDelete All Deployments in a Deployment Environment (Asynchronous API)
Description

Deletes all deployments in a given deployment environment. Only the deployment environment owner can perform this operation

Allowed Role(s)WM_USER
MethodDELETE
URI

v2/jobs/?environmentId=environmentId&hide=true

cloudcenter-ccm-backend/api/v2/jobs/?environmentId=environmentId&hide=true

Sample Request
curl -k -X DELETE -H "Accept: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v2/jobs/?environmentId=14&hide=true" 
curl -k -X DELETE -H "Accept: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v2/jobs/?environmentId=14&hide=true" 
Release

Introduced in CloudCenter 4.8.2

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.
  • This API returns a reference to a tracking ID that can be used to retrieve the delete operation.
  • Default = terminate and hide ( if no variable is passed).
  • If hide = true and successful, then behavior is the same as terminate and hide.
  • If hide = false and successful, then  only terminate (without hiding).
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

action: delete.jobs.jobId
actionparam: environmentId=environmentId&hide=true

See the Enterprise Service Bus (ESB) section for additional context.

Not applicable

Sample Response

The API starts bringing down the deployments launched for this deployment environment. The response to this API would be a reference to a resource that provides latest status of the operation.

{
   "id":"a8f966c8-69c3-4913-ba3e-1e699ee89cf1",
   "resource":"https://<HOST>:<PORT>/v1/operationStatus/a8f966c8-69c3-4913-ba3e-1e699ee89cf1",
   "msg":"DeleteJobsInEnvironment",
   "additionalParameters":[   ]
}

This resource can be queried to get the latest status of the stop operation:

curl -k -X DELETE -H "Accept: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/operationStatus/a8f966c8-69c3-4913-ba3e-1e699ee89cf1"

The server responds with the following message once the deployments are successfully deleted:

{
   "status":"SUCCESS",
   "msg":"Total Jobs in Environment: 4 Completed Jobs: 4 Failed Jobs: 2",
   "resource":"https://<HOST>:<PORT>/v1/environments/1",
   "additionalParameters":[]
}

Request Attributes

environmentId
  • Description: Unique, system-generated identifier for the deployment environment. See the Deployment Environments section for the relevant release for additional details. This attribute is the same as the depEnvId attribute.
  • Type: String

hide
  • Description: Optional attribute that identifies if a deployment that is currently hidden should be included in this task.
  • Type: Boolean
    • true = (Default) Include hidden deployment in this task.
    • false = Do not include hidden deployment in this task

Response Attributes

id
  • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

  • Type: String


msg
  • Description: The job details log message.
  • Type: String

resource
  • Description: Unique URL to access this resource.
  • Type: String

© 2017-2019 Cisco Systems, Inc. All rights reserved