Develop > API calls > Release gate APIs > Create a deploy gate action

Create a deploy gate action

Creates a deploy gate action.

URI Method Parameters Returns

http://[host]:[port]/csa/api/codar/release-gate/gate-action/deploy

POST

 

200 - updated
400 - bad request
401 - Authorization failure
404 - not found
500 - Server Exception

Example

The following URL was sent for the deploy action:

https://localhost:8444/csa/api/codar/release-gate/gate-action/deploy

The following JSON was sent for creating the deploy action:

{ "name": "Test Action", "description": "Action description" , "enabled": "true", "order": "1", "notifyOnSuccess": "true", "notifyOnFailure": "true", "applicationDesignId": "ce61114c-e22a-435f-b967-e04758242572", "stage": "DEVELOPMENT", "rejectOnFailure": "true", "environmentId": "adf557f-bh5t-hj66-df88-a56sdf6", "cleanupOnSuccess": true, "cleanupOnFailure": true, "infra design parameters": [ {"requirementId": "agh568t-bh5t-hj66-df88-a56sdf6","modelId": "hjdx567-tg66-iu69-rg87-ad546gg"}, {"requirementId": "sdfsf786sdf-bh5t-hj66-987sd-896sdfsdf89","modelId": "sdfds876-tg66-iu69-rg87- sds57s8d"} ] }

Note  

  • If you are deploying a package from a complete design, the value of infraDesign parameters (requirementId and modelId) should be null.

    Example: "infraDesignParameters": []

  • If you are deploying a package from a partial design, you can provide Infradesign parameter values for either a single service design or microservices that meet the requirements of the design.

    Example for a single service design:

    "infraDesignParameters": [{
    		"requirementId": "Complete",
    		"modelId": "243c7c75-ec05-40cd-9f36-9fa45751a76c"
    	}]
    }

    Example for microservices

    "infraDesignParameters": [{
    		"requirementId": "ce36905b-21d5-ef3d-8384-dc895d0c7fd4",
    		"modelId": "243c7c75-ec05-40cd-9f36-9fa45751a76c"
    	}, {
    		"requirementId": "857590ab-1031-82db-208e-f50468ac4550",
    		"modelId": "243c7c75-ec05-40cd-9f36-9fa45751a76c"
    	}, {
    		"requirementId": "8f8fc9a5-ea64-4671-6b0a-cdadcbc87885",
    		"modelId": "243c7c75-ec05-40cd-9f36-9fa45751a76c"
    	}]
    }

The following is the response JSON for the deploy action:

{ "@self": "/csa/codar/release-gate/action/", "@type": "urn:x-hp:2012:software:cloud:data_model:ReleaseGateAction", "id": "9cc4b130-fcd3-4f9c-8af4-bf6e82e43136", "actionName": "XYZ", "actionDescription": "Action description", "actionType": "DEPLOY", "createdBy": "admin", "createdOn": "2015-09-15T08:50:48.522Z" }