Update Custom Action

Details

API Details
Name

Update Custom Action

Description

Updates custom actions

MethodPUT
URIv1/entityactions/entityactionId
CloudCenter ReleaseIntroduced in CloudCenter 4.2.
NotesFor additional context on <PORT> usage in the following example(s), see Base URI Format.
ESB Headeraction: update.entityactions.entityactionId

Example

curl -H "Accept:application/json" -H "Content-Type:application/json" -u cliqradmin:40E45DBE57E35ECB -X PUT https://<HOST>:<PORT>/v1/entityactions/1

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
  • 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 Policy Management 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.
      • 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

         
        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).
        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

        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)