Public API – POST Multiple Actions

The actions endpoint allows more than one action to be created and added to an existing Zone. This example demonstrates adding multiple actions to an existing zone in a single call.

URL to call

https://api.bluedotinnovation.com/1/actions

Content Type

The content type should be specified in the Content-Type HTTP header as “application/json”.

image

Content-Type: application/json

Parameters

No URL Parameters required. See example JSON below.

Key JSON fields

Name
Required
Data Type
Description
Format
customerApiKey String API key for customer (rather than the app).
apiKey String API key for the app.
zoneId String The identifier of the zone being updated.
actions Object The actions object is used to add the different action types (Message, URL and Custom).
messageActions Array The messageActions array is used to add one or more message actions to the zone. Refer to POST Message Action for key JSON fields of messageActions.
urlActions String The urlActions array is used to add one or more url actions to the zone. Refer to POST URL Action  for key JSON fields of urlActions.
customActions String The customActions array is used to add one or more custom actions to the zone. Refer to POST Custom Action for key JSON fields of customActions.

Example: JSON request to create multiple actions

{
    "security": {
        "customerApiKey": "bc199c80-5441-11e4-b7bb-a0481cdc3311",
        "apiKey": "d3161e80-38d1-11e4-b039-bc305bf60831"
    },
    "content": {
        "zone": {
            "zoneId": "cc6f9dd1-3d69-454d-abdd-58176cbf67dc",
            "actions": {
                "customActions": [
                    {
                        "name": "A Custom action"
                    }
                ],
                "urlActions": [
                    {
                        "name": "Bluedot URL",
                        "url": "http://www.bluedotinnovation.com"
                    }
                ],
                "messageActions": [
                    {
                        "name": "Welcome to Bluedot Innovation",
                        "title": "Welcome to Bluedot InnovationMessage",
                        "message": "Welcome to Bluedot Innovation."
                    },
                    {
                        "name": "Hello_World",
                        "title": "Hello",
                        "message": "Hello World!!!"
                    }
                ]
            }
        }
    }
}

 

Example: JSON response to request

{
    "objectsUpdated": [
        {
            "actionId": "6a523476-5b5c-472e-a247-32b3ccdf1fb1",
            "actionName": "Welcome to Bluedot Innovation"
        },
        {
            "actionId": "3a62e9ef-c9e6-4534-9f46-df47f6200c72",
            "actionName": "A Custom action"
        },
        {
            "actionId": "a58a18ae-291a-404f-9a8d-1f9692980a61",
            "actionName": "Bluedot URL"
        },
        {
            "actionId": "eb22739e-190a-43ed-8cbe-4d3c73395d92",
            "actionName": "Hello_World"
        }
    ],
    "message": "Your request has been successfully processed.",
    "messageCode": 200
}

Source code examples

Created by Bluedot DevOps on March 3, 2018

Start the discussion