Update Custom Action

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameUpdate Custom Action
Description

Updates custom actions

Allowed Role(s)WM_USER
MethodPUT
URI

v1/entityactions/entityactionId

cloudcenter-ccm-backend/api/v1/entityactions/entityactionId

Sample Request
curl -H "Accept:application/json" -H "Content-Type:application/json" -u cliqradmin:40E45DBE57E35ECB -X PUT https://<HOST>:<PORT>/v1/entityactions/1
curl -H "Accept:application/json" -H "Content-Type:application/json" -u cliqradmin:40E45DBE57E35ECB -X PUT https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v1/entityactions/1
Release

Introduced in CloudCenter 4.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.
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

action: update.entityactions.entityactionId

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

Not applicable

Sample Request Body

{
    "name": "Publish to Enterprise",
    "description": "A custom action to publish an application to enterprise",
    "userVisible": true,
    "entityType": "App",
    "userId": 2,
    "actions": [
        {
            "actionType": "INVOKE_WEB_SERVICE",
            "actionInputs": [
                {
                    "name": "protocol",
                    "value": "https"
                },
                {
                    "name": "url",
                    "value": "www.enterprise.com"
                },
                {
                    "name": "username",
                    "value": "ab.nag"
                },
                {
                    "name": "password",
                    "value": "===redacted==="
                },
                {
                    "name": "requestType",
                    "value": "PUT"
                },
                {
                    "name": "contentType",
                    "value": "json"
                },
                {
                    "name": "commandParams",
                    "value": ""
                },
                {
                    "name": "body",
                    "value": "{\"app_id\":\"%appId%\",\"app_name\":\"%appName%\",
\"latest_app_version\":\"%latestAppVersion%\",\"owner_id\":\"%ownerId%\",
\"owner\":\"%owner%\"}"
                }
            ],
            "associatedParams": null,
            "deleted": false,
            "actionInputsText": "[{
    \"name\": \"protocol\",
    \"value\": \"https\"
},
{
    \"name\": \"url\",
    \"value\": \"www.enterprise.com\"
},
{
    \"name\": \"username\",
    \"value\": \"ab.nag\"
},
{
    \"name\": \"password\",
    \"value\": \"===redacted===\"
},
{
    \"name\": \"requestType\",
    \"value\": \"PUT\"
},
{
    \"name\": \"contentType\",
    \"value\": \"json\"
},
{
    \"name\": \"commandParams\",
    \"value\": \"\"
},
{
    \"name\": \"body\",
    \"value\": \"{
        \\\"app_id\\\": \\\"%appId%\\\",
        \\\"app_name\\\": \\\"%appName%\\\",
        \\\"latest_app_version\\\": \\\"%latestAppVersion%\\\",
        \\\"owner_id\\\": \\\"%ownerId%\\\",
        \\\"owner\\\": \\\"%owner%\\\"
    }\"
}]"
        }
    ]
}

Response

{
    "id": "1",
    "resource": "https://<HOST>:<PORT>/v1/entityactions/1",
    "perms": [],
    "name": "Publish to Enterprise",
    "description": "",
    "entityType": {
        "typeName": "App",
        "displayName": "Application"
    },
    "actions": [
        {
            "id": "16",
            "resource": "https://<HOST>:<PORT>/v1/entityactions/1/16",
            "perms": [],
            "actionType": "invokeWebService",
            "actionInputs": [
                {
                    "name": "body",
                    "value": "{\"app_id\":\"%appId%\",\"app_name\":\"%appName%\",
\"latest_app_version\":\"%latestAppVersion%\",\"owner_id\":\"%ownerId%\",
\"owner\":\"%owner%\"}"
                },
                {
                    "name": "protocol",
                    "value": "https"
                },
                {
                    "name": "username",
                    "value": "ab.nag"
                },
                {
                    "name": "commandParams",
                    "value": ""
                },
                {
                    "name": "requestType",
                    "value": "PUT"
                },
                {
                    "name": "contentType",
                    "value": "json"
                },
                {
                    "name": "password",
                    "value": "===redacted==="
                },
                {
                    "name": "url",
                    "value": "<HOST>:<PORT>/api/now/table/x_cqt_cliqr_publish_app_trigger"
                }
            ],
            "associatedParams": [],
            "deleted": false
        }
    ],
    "userId": 2,
    "userVisible": true
}

Request Attributes

entityActionId
  • Description: Unique, system-generated identifier for the custom action. See the Custom Actions section for the relevant release for additional context.
  • Type: String

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

  • Type: String

description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String

 entityType 
  • Description: Identifies the resource type for this action.
  • Type: Sequence of type and display name

    typeName
    displayName
    • DescriptionA descriptive name for this CloudCenter resource.
    • Type: String

actions (click for additional details)
userId
  • Description: Unique, system-generated identifier for a user
  • Type: String
userVisible
  • Description: Identifies if a service parameter is visible all users in the tenant
    • true = Parameter is visible to all users
    • false = Parameter is not visible to all users (just the admin)
  • Type: Boolean

deleted
  • Description: Identifies if this resource is deleted in the CloudCenter platform.
  • Type: Boolean
    • true = The resource is deleted.
    • false = The resource is not deleted.

Response Attributes

entityActions
  • Description: Identifies custom action that allows the CloudCenter platform to perform one or more configured activities when a user-defined action is triggered by the user for the designated resource.
  • Type: Sequence of action details

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

    • Type: String
    resource
    • Description: Unique URL to access this resource.
    • Type: String
    perms (click for additional context)
    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    description
    • DescriptionA brief description for this CloudCenter Resource.

    • Type: String

     entityType 
    • Description: Identifies the resource type for this action.
    • Type: Sequence of type and display name

      typeName
      displayName
      • DescriptionA descriptive name for this CloudCenter resource.
      • Type: String

    actions
    • Description: Identifies details for the configured action policy See the Policy Management section for the relevant release for additional context.

    • Type: Array of action types

      actionType
      • Description: The value of this attribute is interpreted based on the value of the actionName attribute for this Service Lifecycle Action. See the Service Lifecycle Action section for the relevant release for additional context.
      • Type: Enumeration

        EnumerationDescription
        SCRIPT

        Indicates the script (baked into the image that is used to launch the VM) name and parameters (if any) to be executed on the VM during the corresponding actionName step.

        The entity to be run for this Service Lifecycle Action is a script located at a path relative to where the service bundle zip file is extracted:
        - Linux VMs = /usr/local/osmosix/service/serviceName
        - Windows VMs = C:\program files\osmosix\service\$SERVICE_NAME

        See the Service Lifecycle Action section for the relevant release for additional context.

         This option is not available for Container Service.

        URLIndicates the location from where the script is to be downloaded and executed on the VM during the corresponding actionName step.

        The entity to be run for this Service Lifecycle Action is a HTTP URL pointing to a script that is downloaded (the HTTP URL must be accessible from this VM). See the Service Lifecycle Action section for the relevant release for additional context.
        CMD

        Indicates the command that is be executed on the VM during actionName step.

        The entity to be run for this Service Lifecycle Action is a command that is accessible in the PATH for the user (built into the image that is used to launch the VMs):

        - Linux VMs = cliqruser

        - WindowsVMs = cliqr

        See the Service Lifecycle Action section for the relevant release for additional context.

        Effective CloudCenter 4.1.1, admins can configure the local user on application VMs. The CCO configuration file (/usr/local/osmosix/etc/gateway_config.properties) has an optional property called agent.username to specify the local user. If no user name is specified then cliqruser is the default user.

       
      actionInputs
      • Description: Identifies the parameter for an configured activity. See Policy Management > Action Policy for additional context.
      • Type: Name-Value Pair
       associatedParams 
      • Description: The parameters associated with the selected action typeName
      • Type: Name-Value Pair
    userId
    • Description: Unique, system-generated identifier for a user
    • Type: String
     
    userVisible
    • Description: Identifies if a service parameter is visible all users in the tenant
      • true = Parameter is visible to all users
      • false = Parameter is not visible to all users (just the admin)
    • Type: Boolean

perms (Click for additional details)
© 2017-2019 Cisco Systems, Inc. All rights reserved