Edge Application

ecaKvInfo

Update time: 2024-08-01 15:02:47

Query edge KV storage information, including: storage capacity, read request count, write request count, delete request count.

  • Single user trigger frequency: 60/5min
  • Applicable Products: Edge Application

Request

Body Params

NameDescription
custString
cust_en_name of sub-client. When a merged-account wants to view the information of the subclient,the cust_en_name is required.
dateString
Specifies the query date: 1.With format yyyy-mm-dd. 2.If not Specifies,it means today as default.
startdateString
1.Must work with 'enddate' and they specify the query date scope. 2.With format yyyy-mm-dd hh:MM.If 'hh:MM' not specified,it means '00:01'. 3.If there is a 'date' parameter,this parameter will be omitted.
enddateString
1.Must work with 'startdate' and they specify the query date scope. 2.With format yyyy-mm-dd hh:MM.If 'hh:MM' not specified,it means '24:00'. 3.If there is a 'date' parameter,this parameter will be omitted.
regionString
1.If there are multiple inputs,use ';' as separator.For example,u can use 'region=cn;apac' to query data of cn and apac region. 2.If not specified, it means all the regions.
spaceString
Space names, multiple names should be separated by a semicolon ';'.
timezoneString
Greenwich Mean Time (GMT) zone, the parameter format is GMT+09:00 to indicate East 9th Zone, and GMT-09:00 to indicate West 9th Zone. If not provided, the default is the local time zone (East 8th Zone).
dataformatString
Return result format, supported formats are XML and JSON, default is XML.
datatypeString
4 types. 0: Storage capacity; 1: Read request count; 2: Write request count; 3: Delete request count. Default is: 0.
returnTypeString
Whether to aggregate in a specific manner, format: number_day|hour. For example, 3_hour means to aggregate by 3 hours; 2_day means to aggregate by 2 days.

Response

Body Params

NameDescription
providerString
provider
peakTimeString
Peak time
peakValueString
Peak, unit GB
peakAvgValueString
Peak average, unit GB
totalHitString
total hits
timeString
Time point, format yyyy-mm-dd hh:MM:ss
textString
Value corresponding to the time point

Error code

Error code(code)Description(message)HTTP statusSemantic
403invalid region/invalid channel/no channel/date range exceed limit403invalid region/invalid channel/no channel/date range exceed limit
500internal error500internal error

Example

JSON
XML
JSON
Request example
Copy Copy success
#!/bin/bash
username="example_username"
apiKey="example_apikey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "http://api.cdnetworks.com/myview/ecaKvInfo" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml" \
-d "startdate=2014-08-15&enddate=2014-08-16&dataformat=json"
Response example
Copy Copy success
#Example 1 Query the storage 
{
    "provider": {
        "name": "ChinaNetCenter",
        "type": "wsiInfo",
        "date": {          
            "peakValue": "0.0 GB",
            "peakTime": "2014-08-15 00:05:00",
            "peakAvgValue": "0.00 GB",     
            "channel": {
                "detail": [
                    {
                        "time": "2014-08-15 11:00:00",
                        "text": "0"
                    },
                    {
                        "time": "2014-08-15 11:15:00",
                        "text": "0"
                    },
                    {
                        "time": "2014-08-15 12:30:00",
                        "text": "0"
                    }
                ]
            }
        }
    }
}

#Example 1 Query the hits
{
    "provider": {
        "name": "ChinaNetCenter",
        "type": "wsiInfo",
        "date": {
            "totalHit": "123",
            "channel": {
                "detail": [
                    {
                        "time": "2014-08-15 11:00:00",
                        "text": "0"
                    },
                    {
                        "time": "2014-08-15 11:15:00",
                        "text": "0"
                    },
                    {
                        "time": "2014-08-15 12:30:00",
                        "text": "0"
                    }
                ]
            }
        }
    }
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!