File size: 628 Bytes
9f56796
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
**To retrieve sample messages from a channel**

The following ``sample-channel-data`` example retrieves a sample of messages from the specified channel ingested during the specified timeframe. You can retrieve up to 10 messages. ::

    aws iotanalytics sample-channel-data \
        --channel-name mychannel

Output::

    {
        "payloads": [
            "eyAidGVtcGVyYXR1cmUiOiAyMCB9",
            "eyAiZm9vIjogImJhciIgfQ=="
        ]
    }

For more information, see `SampleChannelData <https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_SampleChannelData.html>`__ in the *AWS IoT Analytics API Reference*.