Skip to main content

Get Operating Information in Near Real-Time

Enable near real-time access to environmental and operating information using API Plus.

AWS IoT Core

Download and Register Equinix Certificate

To authorize Equinix API Plus service to send events to an AWS IoT Core topic, you must download Equinix Certificate and register it in IoT Core console. For details, see Download and Register Equinix Certificate

Authenticate

Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to API Authentication for instructions on how to call the OAuth API to validate and authenticate your credentials.

Step 3: Create Subscription

Use the Create Subscription API request to define a streaming subscription instance.

Sample curl request - create an Amazon IoT Core communication channel for temperature and humidity readings.

curl -X   
POST 'https://api.equinix.com/smartview/v2/streaming/subscriptions'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
    "messageType": {
        "asset": [],
        "environmental": [
            {
                "accountNumber": "116710",
                "ibx": [
                    "LD9"
                ],
                "level": [
                    "CAGE"
                ]
            }
        ],
        "power": [],
        "meteredPower": [],
        "systemAlert": [],
        "customAlert": []
    },
    "channel": {
        "channelType": "AWS_IOT_CORE",
        "awsIotCoreChannelConfiguration": {
            "url": "https://z3z1k7yl79260o-ats.iot.eu-west-2.amazonaws.com"
        }
    }
}' 

Step 4: Consume Real-Time Feed

Subscribe to the AWS IoT Core topic and consume messages. For details, refer to AWS IoT Core documentation.

tip

You can also use Get Subscription Data API request to retrieve your streaming channel messages.

REST

Step 1: Authenticate

Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication.

curl -X  
POST 'https://api.equinix.com/oauth2/v1/token'
-H 'content-type: application/json'
-d '{
    "grant_type": "client_credentials",
    "client_id": "<client_id>",
    "client_secret": "<client_secret>"
}'

Step 2: Create Subscription

Use the Create Subscription API request to define a streaming subscription instance.

Sample curl request - create a REST communication channel for power consumption readings.

curl -X   
POST 'https://api.equinix.com/smartview/v2/streaming/subscriptions'
-H 'authorization: Bearer <token>'
-d '{
    "messageType": {
        "asset": [],
        "environmental": [],
        "power": [
            {
                "accountNumber": "1",
                "ibx": [
                    "LD9"
                ]
            }
        ],
        "meteredPower": [],
        "systemAlert": [],
        "customAlert": []
    },
    "channel": {
        "channelType": "REST",
        "restChannelConfiguration": {
        }
    }
}' 

Sample Response

HTTP/1.1 201 Created  
Location: /smartview/v2/streaming/subscriptions/0f6bdb36-e130-4924-b038-ee1785fad999

The Location header in the response contains the subscription identifier required to consume the real-time feed.

Step 3: Consume Events

Use the Get Subscription Data API request to retrieve your REST streaming channel messages.

Sample curl request

curl -X   
GET 'https://api.equinix.com/smartview/v2/streaming/subscriptionData/0f6bdb36-e130-4924-b038-ee1785fad999'

Sample response

{  
    "alarmMessageData": [],
    "alertMessageData": [],
    "environmentMessageData": [],
    "meteredPowerMessageData": [],
    "powerMessageData": [
        {
            "type": "power",
            "data": {
                "streamId": "20409808",
                "ibx": "LD9",
                "asset": {
                    "id": "20409808",
                    "type": "CIRCUIT"
                },
                "cage": "LD9:0G:0Z10BB",
                "cabinet": "LD9:0G:0Z10BB:0109",
                "accountNumber": "116710",
                "description": "32-amp 230v Single Phase Primary AC Power",
                "oid": "1.3.6.1.2.1.299.36.10.4442",
                "realPower": {
                    "value": "0.000",
                    "unit": "kW"
                },
                "apparentPower": {
                    "value": "0.000",
                    "unit": "kVA"
                },
                "current": {
                    "value": "0.000",
                    "unit": "A"
                },
                "powerFactor": {
                    "value": "0.000",
                    "unit": "pf"
                },
                "soldCurrent": {
                    "value": "32.000",
                    "unit": "A"
                },
                "soldPower": {
                    "value": "7.360",
                    "unit": "kVA"
                },
                "powerConsumptionToContractual": {
                    "value": "0.000",
                    "unit": "PERCENT"
                },
                "peakLastSevenDays": {
                    "value": "0.000",
                    "unit": "kVA"
                },
                "peakLastSevenDaysRatio": {
                    "value": "0.000",
                    "unit": "PERCENT"
                },
                "peakLastSevenDaysContractualPower": {
                    "value": "7.360",
                    "unit": "kVA"
                },
                "peakLastSevenDaysTime": "2023-12-06T05:45:00",
                "lastUpdated": "2023-12-07T15:49:00",
                "readingTime": "2023-12-07T15:45:00"
            }
        },
        {
            "type": "power",
            "data": {
                "streamId": "20409809",
                "ibx": "LD9",
                "asset": {
                    "id": "20409809",
                    "type": "CIRCUIT"
                },
                "cage": "LD9:0G:0Z10BB",
                "cabinet": "LD9:0G:0Z10BB:0109",
                "accountNumber": "116710",
                "description": "32-amp 230v Single Phase Redundant AC Power",
                "oid": "1.3.6.1.2.1.299.36.10.4443",
                "realPower": {
                    "value": "0.000",
                    "unit": "kW"
                },
                "apparentPower": {
                    "value": "0.000",
                    "unit": "kVA"
                },
                "current": {
                    "value": "0.000",
                    "unit": "A"
                },
                "powerFactor": {
                    "value": "0.000",
                    "unit": "pf"
                },
                "soldCurrent": {
                    "value": "32.000",
                    "unit": "A"
                },
                "soldPower": {
                    "value": "7.360",
                    "unit": "kVA"
                },
                "powerConsumptionToContractual": {
                    "value": "0.000",
                    "unit": "PERCENT"
                },
                "peakLastSevenDays": {
                    "value": "0.000",
                    "unit": "kVA"
                },
                "peakLastSevenDaysRatio": {
                    "value": "-1.000",
                    "unit": "PERCENT"
                },
                "peakLastSevenDaysContractualPower": {
                    "value": "0.000",
                    "unit": "kVA"
                },
                "peakLastSevenDaysTime": "2023-12-06T22:15:00",
                "lastUpdated": "2023-12-07T15:49:00",
                "readingTime": "2023-12-07T15:45:00"
            }
        }
    ],
    "tagPointMessageData": [],
    "pagination": {
        "offset": 0,
        "limit": 250,
        "total": 46,
        "next": null,
        "previous": "?offset=0&limit=250"
    }
}