
¿·¢¡¤k8¹ú¼ÊÔƶþ´Î¿ª·¢µ÷È¡ÃüÁîÏ·¢½Ó¿Ú
Ò»¡¢×ÊÁÏ×¼±¸£º
¿·¢¡¤k8¹ú¼ÊÔÆÍøÖ·£ºhttp://cloud.usr.cn/
¶þ´Î¿ª·¢Îĵµ£ºhttp://cloud.usr.cn/document/237.html
¶þ¡¢×¢Ò⣺
1¡¢Óû§¿ÉÒÔͨ¹ýhttpÇëÇóÏòÉ豸Ï·¢Êý¾Ý£¬Ä¿Ç°½öÖ§³ÖÊý¾ÝµãÊý¾ÝºÍ͸´«Êý¾ÝµÄÏ·¢
2¡¢Ã¿¸öÓû§Ã¿Ãë×î¶àÏ·¢10ÌõÊý¾Ý£¬³¬³ö²¿·ÖµÄÊý¾Ý£¬·þÎñÆ÷²»´¦Àí²¢·µ»Ø´íÎóÂë
3¡¢½øÐжþ´Î¿ª·¢Ê±ÐèÒª½«Ê¹ÓõÄÉ豸ÔÚÏß
4¡¢Á÷³Ì£º
£¨1£©Í¨¹ýÓû§µÇ½½Ó¿Ú»ñÈ¡token
£¨2£©»ñÈ¡ÍÆË͵Äurl,»ñÈ¡ÃüÁîÏ·¢µØÖ·,×¢:¸Ã½Ó¿ÚÓÐƵÂÊÏÞÖÆ,»ñÈ¡Ò»´Îºó¿ÉÖظ´Ê¹ÓÃ,²»ÐèƵ·±»ñÈ¡
£¨3£©°´Õսӿڹ淶ÍÆËÍÃüÁîÊý¾Ý
Èý¡¢¾ßÌå²Ù×÷²½Ö裺
1¡¢ÔÚ½Ó¿ÚÎĵµÖÐÕÒµ½Óû§µÇ¼½Ó¿Ú£¨¶þ´Î¿ª·¢-API-Óû§-Óû§µÇ¼£©
½«ÇëÇóURLºÍÇëÇó·½Ê½Ìîµ½postmanÖÐ
2¡¢ÔÚheadersÖÐÌí¼ÓContent-TypeÇëÇó²ÎÊý£¬ÖµÎªapplication/json
3¡¢½«ÇëÇóʾÀý´óÀ¨ºÅÖеÃÊý¾Ý¸´ÖƵ½bodyµÄrawÖÐ
accountÖÐÌî¿·¢¡¤k8¹ú¼ÊÔÆÕ˺ţ¬passwordÖÐÌî¿·¢¡¤k8¹ú¼ÊÔÆÃÜÂëmd5¼ÓÃÜÖ®ºóµÄÃÜÂë
ÉèÖÃÍê³Éºóµã»÷Send£¬»ñÈ¡Éú³ÉµÄtoken
4¡¢ÔÚ¶þ´Î¿ª·¢Îĵµ½çÃæ´ò¿ª»ñÈ¡ÃüÁîÏ·¢µØÖ·£¨¶þ´Î¿ª·¢-ÃüÁîÏ·¢-ʹÓÃÎĵµ-»ñÈ¡ÃüÁîÏ·¢µØÖ·£©
5¡¢½«ÃüÁîÏ·¢µÄÇëÇó·½Ê½ºÍÇëÇóURLÌîÈëpostmanÖÐ
ÔÚheadersÖÐÌí¼ÓContent-TypeºÍtoken£¬Öµ·Ö±ðΪapplication/jsonÒÔ¼°¸Õ¸Õ»ñÈ¡µ½µÄtoken
Éú³ÉµÄtokenÁ½Ð¡Ê±ÄÚÓÐЧ
6¡¢½«ÇëÇóʾÀý¸´ÖƵ½bodyµÄrawÖУ¬Ö®ºóµã»÷Send£¬»áÉú³ÉÒ»¸öÁ´½Ó£¬Õâ¸öÁ´½ÓÊÇÃüÁîÏ·¢µØÖ·
7¡¢¶þ´Î¿ª·¢Îĵµ´ò¿ªÃüÁîÏ·¢½çÃ棨¶þ´Î¿ª·¢-ÃüÁîÏ·¢-ʹÓÃÎĵµ£©
ÃüÁîÏ·¢µÄ½Ó¿ÚÀàÐÍΪpost£¬ÐÒéÀàÐÍΪhttps
½«¸Õ¸ÕÉú³ÉµÄÃüÁîÏ·¢µØÖ·¸´ÖƵ½Ð½¨µÄ´°¿ÚµÄURLÖУ¬ºó±ß¼ÓÉÏ/v1.0/{type}/{deviceId}
ÆäÖÐtype: dataPoint»òtransmission(dataPoint:±äÁ¿Êý¾Ý,transmission:͸´«Êý¾Ý)£»deviceId:É豸sn
8¡¢ÔÚheadersÖÐÌí¼ÓContent-TypeºÍtoken£¬Öµ·Ö±ðΪapplication/jsonÒÔ¼°¸Õ¸Õ»ñÈ¡µ½µÄtoken
Éú³ÉµÄtokenÁ½Ð¡Ê±ÄÚÓÐЧ
9¡¢ÔÚbodyÖÐÌîÈëʾÀýÖеĴúÂë
Êý¾Ý͸´«µÄ»°ÌîÈë"data":"YWJjZGVmZw=="£¬ÆäÖÐdataÖеÄÊý¾ÝΪ͸´«µÄÊý¾Ý£¨Êý¾ÝתΪbase64´«Êä,×î´ó³¤¶ÈΪ8000¸ö×Ö·û£©
×é̬Êý¾ÝµÄ»°£¬slaveNameΪ´Ó»úÃû³Æ£¬variableNameΪ±äÁ¿Ãû³Æ£¬valueΪÊý¾Ý±¾Éí
10¡¢Èç¹û·µ»Ø200£¬ÔòÖ¤Ã÷½Ó¿ÚÏ·¢³É¹¦