Create Action Execution

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameCreate Action Execution
DescriptionCreates a new action to invoke web service, execute a command, invoke a Puppet/Chef/Ansible service, or execute a command using available/custom parameters
Allowed Role(s)WM_USER
MethodPOST
URIv1/actions/actionId/executions

cloudcenter-ccm-backend/api/v1/actions/actionId/executions

Sample Request
curl -k -X POST -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/actions/actionId/executions"
curl -k -X POST -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v1/actions/actionId/executions"
Release

Introduced in CloudCenter 4.8.0

Introduced 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.
Back To LinksCommon CloudCenter API CallsWorkload Manager API

ESB Header

action: create.actions.actionId.executions

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

Not applicable

Sample Request Body (Create Snapshot)

{  
   "resourceType":"VIRTUAL_MACHINE",
   "executionSpecs":[  
      {  
         "name":"snapshotName",
         "value":"demodocs"
      }
   ],
   "executionResources":[  
      {  
         "id":"947"
      }
   ]
}

Response

{
   "id":"1637",
   "resource":"https://<HOST>:<PORT>/v1/executions/1637",
   "executionResources":[
      {
         "cloudResourceId":"4221035d-8581-8571-bfb3-fc77d6773a20",
         "id":947,
         "regionId":3,
         "cloudAccountId":35,
         "cloudResourceProperties":[

         ]
      }
   ],
   "resourceType":"VIRTUAL_MACHINE",
   "executionSpecs":[
      {
         "name":"snapshotName",
         "value":"demodocs"
      }
   ],
   "acknowledgedByUser":false,
   "acl":null
}

Request Attributes

actionId
  • Description: The Managed VM ID or jobId or Application Profile ID.

  • Type: Long

executionSpecs
  • Description: The custom parameters required to execute the action – only required if you have the required permissions (editable and unlocked).
  • Type: Array of name-value pairs

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    value
    • Description: Indicates the set value for this property
    • Type: Float

  • Example:

    "executionSpecs":[  
          {  
             "name":"snapshotName",
             "value":"demodocs"
          }
       ]
 executionResources

executionResources
  • Description: CloudCenter resources that are available for this execution.
  • Type: Sequence of resource details

    resourceId
    • Description: Unique identifier for a CloudCenter Resource managed by ACLs. This ID is generated automatically by the CloudCenter platform when the resource is created.  
    • Type: String

    resourceName
    • Description: The name of the resource. 

    • Type: String

    status (nodeStatus)
    • Description: The node status for this resource. 

    • Type: Enumeration. See the Deployment and VM States > VM (Node) States section for the relevant release for additional details.

     result 
    • Type: String
     logs 
    • Description: Lists logs for the identified VM.
    • Type: Sequence of log details

      message
      • Description: Identifies the resulting progress message for the workflow activity execution.

      • Type: String

      status
      • Description: The action status for this resource.

      • Type: Enumeration

        EnumerationDescription
        SUBMITTEDThe CloudCenter platform has received the task request and started to process it but the action is not yet completed.
        SCHEDULEDThe task is configured to start at some point in the future.
        STARTEDThe task has started successfully.
        IN_PROGRESSThe task is in the process of being executed.
        PENDINGThe task is still awaiting completion due to the completion of another task.
        CANCELEDThe task was terminated after it was started.
        APPROVEDThe task was approved by the authorized approver(s).
        REJECTEDThe task was rejected by the authorized approver(s).
        COMPLETEDThe task was completed successfully.
        ERRORThe task was aborted due to an error.
        TIMEOUTThe task did not complete within the allocated time.

       timestamp 
      • Description: The CloudCenter API date and time values are formatted in Unix time to the millisecond level.
      • Type: String


Response Attributes

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

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

executionResources
  • Description: CloudCenter resources that are available for this execution.
  • Type: Sequence of resource details

    resourceId
    • Description: Unique identifier for a CloudCenter Resource managed by ACLs. This ID is generated automatically by the CloudCenter platform when the resource is created.  
    • Type: String

    resourceName
    • Description: The name of the resource. 

    • Type: String

    status (nodeStatus)
    • Description: The node status for this resource. 

    • Type: Enumeration. See the Deployment and VM States > VM (Node) States section for the relevant release for additional details.

     result 
    • Type: String
     logs 
    • Description: Lists logs for the identified VM.
    • Type: Sequence of log details

      message
      • Description: Identifies the resulting progress message for the workflow activity execution.

      • Type: String

      status
      • Description: The action status for this resource.

      • Type: Enumeration

        EnumerationDescription
        SUBMITTEDThe CloudCenter platform has received the task request and started to process it but the action is not yet completed.
        SCHEDULEDThe task is configured to start at some point in the future.
        STARTEDThe task has started successfully.
        IN_PROGRESSThe task is in the process of being executed.
        PENDINGThe task is still awaiting completion due to the completion of another task.
        CANCELEDThe task was terminated after it was started.
        APPROVEDThe task was approved by the authorized approver(s).
        REJECTEDThe task was rejected by the authorized approver(s).
        COMPLETEDThe task was completed successfully.
        ERRORThe task was aborted due to an error.
        TIMEOUTThe task did not complete within the allocated time.

       timestamp 
      • Description: The CloudCenter API date and time values are formatted in Unix time to the millisecond level.
      • Type: String

resourceType
  • Description: The data type for a CloudCenter Resource.

  • Type: String

    StringCategory
    CLOUD_FAMILYIdentifies this resource to be the cloud family
    CLOUD_TYPEIdentifies this resource to be the cloud region
    APP_NAMEIdentifies this resource to be the application
executionSpecs
  • Description: The custom parameters required to execute the action – only required if you have the required permissions (editable and unlocked).
  • Type: Array of name-value pairs

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    value
    • Description: Indicates the set value for this property
    • Type: Float

  • Example:

    "executionSpecs":[  
          {  
             "name":"snapshotName",
             "value":"demodocs"
          }
       ]
acknowledgedByUser
  • Description: Identifies if the action is to be acknowledged by the user.
  • Type: Boolean
    • true = The action must be acknowledged.
    • false = Default. The action need not be acknowledged.
 acl

acl
  • Description: The users who are permitted to perform this action
  • Type: Sequence of user-specific details

    users
    • Description: The user that is assigned permission to view, modify, or manage this action. 
    • Type: Admin-defined string
    tenantUsers
    • Description: The tenant that is assigned permission to view, modify, or manage this action. 
    • Type: Admin-defined string
    userGroups
    • Description: The user group that is assigned permission to view, modify, or manage this action. 
    • Type: Admin-defined string
     ownerUserId 
    • DescriptionUnique, system-generated identifier for the owner of the resource. For example, a ServiceNow extension owner's User ID.

    • Type: String

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