View Custom Actions

Details

API Details
Name

View Custom Actions

DescriptionGet a list of policies that belong to user. The Submit Job API uses this API to add policies at run time.
MethodGET
URI
  • v1/entityactions
  • v1/entityactions/entityactionId
CloudCenter Release

Introduced in CloudCenter 4.2

NotesFor additional context on <PORT> usage in the following example(s), see Base URI Format.
ESB Header
  • action: get.entityactions
  • action: get.entityactions.entityactionId

Example

curl -k -X GET -H "Accept: application/json" -u admin_5:40E45DBE57E35ECB https://<HOST>:<PORT>/v1/entityactions 

Response for v1/entityactions

{
    "entityActions": [
        {
            "id": "1",
            "resource": "https://<HOST>:<PORT>/v1/entityactions/1",
            "perms": [],
            "name": "Publish to Enterprise",
            "description": "",
            "entityType": {
                "typeName": "App",
                "displayName": "Application"
            },
            "actions": [
                {
                    "id": "16",
                    "resource": null,
                    "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": "===readacted==="
                        },
                        {
                            "name": "url",
                            "value": "<HOST>:<PORT>/api/now/table/x_cqt_cliqr_publish_app_trigger"
                        }
                    ],
                    "associatedParams": [],
                    "deleted": false
                }
            ],
            "userId": 2,
            "userVisible": true
        },
        {
            "id": "3",
            "resource": "https://snow-dev.cliqrtech.com/v1/entityactions/3",
            "perms": [],
            "name": "Publish to Enterprise",
            "description": "A custom action to publish an application to enterprise",
            "entityType": {
                "typeName": "App",
                "displayName": "Application"
            },
            "actions": [
                {
                    "id": "19",
                    "resource": null,
                    "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": "www.enterprise.com"
                        }
                    ],
                    "associatedParams": [],
                    "deleted": false
                }
            ],
            "userId": 2,
            "userVisible": true
        }
    ],
    "size": 2,
    "permsList": [
        {
            "id": "1",
            "resource": "https://<HOST>:<PORT>/v1/entityactions/1",
            "perms": [
                "write",
                "read",
                "administration",
                "delete"
            ]
        },
        {
            "id": "3",
            "resource": "https://<HOST>:<PORT>/v1/entityactions/3",
            "perms": [
                "write",
                "read",
                "administration",
                "delete"
            ]
        }
    ]
}

Response for v1/entityactions/entityactionId

{
    "id": "1",
    "resource": "https://<HOST>:<PORT>/v1/entityactions/1",
    "perms": [
        "write",
        "read",
        "administration",
        "delete"
    ],
    "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

 

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)