API - Strategy Deployment

Description
These APIs are used to perform CRUD operations on the strategy deployment.
Get Deployment State
GET /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/deployment
Output
Table 1. Response Codes
Success 200 Ok
Error 400 Inputs provided for the API are not valid.
Server Error 500 Internal Server Error. For more details, check the logs.
Example response – Content-Type:application/json
{
    "campaignId": 0,
    "deployAction": "",
    "state": 0,
    "deployedState": 0,
    "dirty": false,
    "lastProdDepTime": 0,
    "lastMarkTime": 0,
    "deploymentStatusText": "",
    "deploymentWaitMessage": ""
}
deployedState
  • NOT_YET_DEPLOYED: 10
  • DEPLOYED: 11
  • UN_DEPLOYED: 12
State
  • READY_FOR_DEPLOYMENT: 0
  • READY_FOR_UN_DEPLOYMENT: 1
  • MARK_FOR_DEPLOYMENT: 2
  • MARK_FOR_UN_DEPLOYMENT: 3
Mark for deployment or undeployment
PUT /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/deployment
Input
Body Parameter – Content-Type:application/json
{
"campaignId": 0, 
"deployAction" : ""
}
Table 2. Request Parameters
Parameters Description
Campaignid If a campaign is associated with the strategy, the campaign Id is required.
deployAction "markDeploy: Mark for deployment".

"markUnDeploy: Mark for un-deployment"

Output
Table 3. Response Codes
Success 202 Accepted
Error 400 Bad Request
Server Error 500 Internal/Server Error
Example Response – Content-Type:application/json
{
    "campaignId": 0,
    "deployAction": "",
    "state": 0,
    "deployedState": 0,
    "dirty": false,
    "lastProdDepTime": 0,
    "lastMarkTime": 0,
    "deploymentStatusText": "",
    "deploymentWaitMessage": ""
}
Cancel mark for deployment or undeployment
DELETE /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/deployment
Input
Body Parameter – Content-Type:application/json
{
     "campaignId": 0,
     "deployAction" : ""
}
Table 4. Request Parameters
Parameter Description

CampaignId

If a campaign is associated with the strategy, the campaign Id is required
deployAction

"cancelDeploy": Cancel "Mark for deployment"

"cancelUnDeploy": Cancel "Mark for un-deployment

Output
Table 5. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal/Server Error
Example response – Content-Type:application/json
{
    "campaignId": 0,
    "deployAction": "",
    "state": 0,
    "deployedState": 0,
    "dirty": false,
    "lastProdDepTime": 0,
    "lastMarkTime": 0,
    "deploymentStatusText": "",
    "deploymentWaitMessage": ""
}