Jump to: navigation, search

Deploy Rule Package or Snapshot

Method

POST

Syntax

 
/grs/v1/tenant/{tenantId}/package/{packageId}/deploy

Request Body

 
{  
  "target": "GRE_Cluster",
  "snapshotName":"Snap 01",
  "comments":"Deploy to QA servers",
  "deployScheduledDateTime": 34243432432
}

Response Body

 
{ 
"target": "GRE_Cluster",  "deploymentId" : 34234,
  "snapshotName":"Snap 01",
  "comments":"Deploy to QA servers",
  "deployScheduleDateTime": 34243432432
}

HTTP Status Codes

  • 201 Created—Response body provided with deployment ID
  • 401 Unauthorized—APIToken not valid
  • 403 Forbidden—User does not have permission for the specified tenant or does not have proper permission to perform this operation.
  • 404 Not Found—could not find specified package ID or snapshot name
  • 422 Unprocessable Entity—Field Validation Error
 
{
  "message": "Validation Failed",
  "errors": [
    {
       "code" : "1000",
       "field" : "name",
       "message": "snapshot name is not found"
}
    {
       "code" : "1001",
       "field" : "deployScheduleDateTime",
       "message": "scheduled date/time is in the past."
}
]
}
  • 422 Unprocessable Entity—Rules in package do not validate
 
{
"message": "Package Validation Failed",
  "errors": [
    {
      "message": "Validation error 1"
    },
    {
      "message": "Validation error 2"
    }
  ]
}

Notes

User must have PACKAGE_DEPLOY and SNAPSHOT_VIEW permissions.

  • target—Indicate which GRE or GRE Cluster you want to deploy to. Use "Query Deploy Targets" to get the list of valid targets.
  • snapShotName—To deploy "latest" package, specify "LATEST" as snapshot name (or omit the field).
  • deployScheduledDateTime—To schedule deployment for a future time, pass in scheduledDateTime field in UTC ms since EPOCH. To schedule immediately, omit this field.
This page was last edited on May 16, 2017, at 08:21.
Comments or questions about this documentation? Contact us for support!