{"id":1830,"date":"2024-12-13T10:04:57","date_gmt":"2024-12-13T02:04:57","guid":{"rendered":"https:\/\/www.ecloudedge.com\/?p=1830"},"modified":"2026-03-30T17:12:02","modified_gmt":"2026-03-30T09:12:02","slug":"neoedge-x-restful-api-instrucion","status":"publish","type":"post","link":"https:\/\/www.ecloudedge.com\/en\/neoedge-x-restful-api-instrucion\/","title":{"rendered":"NeoEdge X OT Device RESTful API"},"content":{"rendered":"\n<p>NeoEdge X \u63d0\u4f9b RESTful API \uff0c\u8b93\u60a8\u7684\u5916\u90e8\u61c9\u7528\u7a0b\u5f0f\u53ef\u4ee5\u8b80\u53d6(Read) \u8a2d\u5099\u6578\u64da\u548c\u767c\u9001 (Write) \u63a7\u5236\u6307\u4ee4\u4f86\u64cd\u63a7 OT \u8a2d\u5099\u3002\u672c\u6587\u4ef6\u5c07\u8aaa\u660e NeoEdge X RESTful API \u7684\u4f7f\u7528\u65b9\u5f0f\u53ca\u6bcf\u500b\u6b04\u4f4d\u7684\u5b9a\u7fa9\uff0c\u5e6b\u52a9\u60a8\u6574\u5408\u5230\u60a8\u7684\u61c9\u7528\u7cfb\u7d71\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u8b80\u53d6 OT Device Tag \u6578\u503c<\/h5>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>curl -X 'GET' 'http:\/\/&lt;Gatewap_IP>:59882\/api\/v3\/device\/name\/&lt;Device_Name>\/&lt;Tag_Name>' | jq '.event.readings&#91;0]'<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u56de\u8986\u5167\u5bb9<\/h5>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>{\n    \"id\": \"5522d833-8383-48a5-b8ed-7a534a701ef3\",\n    \"origin\": &lt;timestamp&gt;,\n    \"deviceName\": \"&lt;Device_Name&gt;\",\n    \"resourceName\": \"&lt;Tag_Name&gt;\",\n    \"profileName\": \"&lt;Porfile_Name&gt;\",\n    \"valueType\": \"&lt;Tag_Type&gt;\",\n    \"value\": \"&lt;Tag_Value&gt;\"\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-table is-style-stripes\">\n<table style=\"width: 100%; height: 232px;\">\n<tbody>\n<tr style=\"height: 12px;\">\n<td class=\"wp-block-table__cell-content\" style=\"width: 1.33333%; height: 12px;\">\n<div class=\"block-editor-rich-text__editable rich-text\" role=\"textbox\" contenteditable=\"true\" aria-multiline=\"true\" aria-label=\"\u5167\u5bb9\u5132\u5b58\u683c\u6587\u5b57\" aria-readonly=\"false\"><span style=\"color: #000000;\"><strong data-rich-text-format-boundary=\"true\">\u6b04\u4f4d\u540d\u7a31<\/strong><\/span><\/div>\n<\/td>\n<td class=\"wp-block-table__cell-content\" style=\"width: 34.6667%; height: 12px;\">\n<div class=\"block-editor-rich-text__editable rich-text\" role=\"textbox\" contenteditable=\"true\" aria-multiline=\"true\" aria-label=\"\u5167\u5bb9\u5132\u5b58\u683c\u6587\u5b57\" aria-readonly=\"false\"><span style=\"color: #000000;\"><strong>\u8aaa\u660e<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 60px;\">\n<td style=\"width: 1.33333%; text-align: left; height: 60px;\">\n<p>origin<\/p>\n<\/td>\n<td style=\"width: 34.6667%; text-align: left; height: 60px;\">\n<p>\u6578\u64da\u64f7\u53d6\u7684Timestamp\uff0c\u55ae\u4f4d\u70bans<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 12px;\">\n<td style=\"height: 10px; width: 1.33333%; text-align: left;\">\n<p>deviceName<\/p>\n<\/td>\n<td style=\"height: 10px; width: 34.6667%; text-align: left;\">\n<p>OT Device Name<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 60px;\">\n<td style=\"width: 1.33333%; text-align: left; height: 60px;\">\n<p>resourceName<\/p>\n<\/td>\n<td style=\"width: 34.6667%; text-align: left; height: 60px;\">\n<p>OT Tag Name<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 12px;\">\n<td style=\"height: 10px; width: 1.33333%; text-align: left;\">\n<p>profileName<\/p>\n<\/td>\n<td style=\"height: 10px; width: 34.6667%; text-align: left;\">\n<p>OT Profile Name\uff0c\u9810\u8a2d\u503c\u70ba &lt;Device_Name&gt;-profile<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 60px;\">\n<td style=\"width: 1.33333%; height: 60px; text-align: left;\">\n<p>valueType<\/p>\n<\/td>\n<td style=\"width: 34.6667%; height: 60px; text-align: left;\">\n<p>OT Tag Type<\/p>\n<p>\u4f9d\u7167\u8a2d\u5b9a\u7684tag\u8cc7\u6599\u578b\u5225\uff0c\u53ef\u80fd\u6578\u503c\u70ba\uff1a<\/p>\n<p>[&#8220;Bool&#8221;, &#8220;Int16&#8221;, &#8220;Int32&#8221;, &#8220;Int64&#8221;, &#8220;Uint16&#8221;, &#8220;Uint32&#8221;, &#8220;Uint64&#8221;, &#8220;Float32&#8221;, &#8220;Float64&#8221;, &#8220;String&#8221;]<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 20px;\">\n<td style=\"width: 1.33333%; height: 20px; text-align: left;\">value<\/td>\n<td style=\"width: 34.6667%; height: 20px; text-align: left;\">Tag\u7684\u8b80\u503c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<\/div>\n\n\n\n<h5 class=\"wp-block-heading\">\u5beb\u5165OT Device Tag \u6578\u503c<\/h5>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>curl -X 'PUT' 'http:\/\/&lt;Gatewap_IP>:59882\/api\/v3\/device\/name\/&lt;Device_Name>\/&lt;Tag_Name>' \\\n     -H 'Content-Type: application\/json' \\\n     -d '{\"&lt;Tag_Name>\":&lt;New_Value>}'<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u56de\u8986\u5167\u5bb9<\/h5>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>{\n  \"apiVersion\": \"v3\",\n  \"statusCode\": 200\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-table is-style-stripes\">\n<table style=\"width: 100%; height: 22px;\">\n<tbody>\n<tr style=\"height: 12px;\">\n<td class=\"wp-block-table__cell-content\" style=\"width: 1.33333%; height: 12px;\">\n<div class=\"block-editor-rich-text__editable rich-text\" role=\"textbox\" contenteditable=\"true\" aria-multiline=\"true\" aria-label=\"\u5167\u5bb9\u5132\u5b58\u683c\u6587\u5b57\" aria-readonly=\"false\"><span style=\"color: #000000;\"><strong data-rich-text-format-boundary=\"true\">\u6b04\u4f4d\u540d\u7a31<\/strong><\/span><\/div>\n<\/td>\n<td class=\"wp-block-table__cell-content\" style=\"width: 34.6667%; height: 12px;\">\n<div class=\"block-editor-rich-text__editable rich-text\" role=\"textbox\" contenteditable=\"true\" aria-multiline=\"true\" aria-label=\"\u5167\u5bb9\u5132\u5b58\u683c\u6587\u5b57\" aria-readonly=\"false\"><span style=\"color: #000000;\"><strong>\u8aaa\u660e<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 12px;\">\n<td style=\"height: 10px; width: 1.33333%; text-align: left;\">\n<p>statusCode<\/p>\n<\/td>\n<td style=\"height: 10px; width: 34.6667%; text-align: left;\">\n<p>HTTP\u72c0\u614b\u78bc<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NeoEdge X \u63d0\u4f9b RESTful API \uff0c\u8b93\u60a8\u7684\u5916\u90e8\u61c9\u7528\u7a0b\u5f0f\u53ef\u4ee5\u8b80\u53d6(Read) \u8a2d\u5099\u6578\u64da\u548c\u767c\u9001 ( [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1820,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-1830","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-support-documents"],"blocksy_meta":[],"uagb_featured_image_src":{"full":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api.webp",1120,747,false],"thumbnail":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api-150x150.webp",150,150,true],"medium":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api-300x200.webp",300,200,true],"medium_large":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api-768x512.webp",768,512,true],"large":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api-1024x683.webp",1024,683,true],"1536x1536":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api.webp",1120,747,false],"2048x2048":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api.webp",1120,747,false],"trp-custom-language-flag":["https:\/\/www.ecloudedge.com\/wp-content\/uploads\/2024\/12\/whatis_rest_api-18x12.webp",18,12,true]},"uagb_author_info":{"display_name":"kevinkao","author_link":"https:\/\/www.ecloudedge.com\/en\/author\/kevinkao\/"},"uagb_comment_info":0,"uagb_excerpt":"NeoEdge X \u63d0\u4f9b RESTful API \uff0c\u8b93\u60a8\u7684\u5916\u90e8\u61c9\u7528\u7a0b\u5f0f\u53ef\u4ee5\u8b80\u53d6(Read) \u8a2d\u5099\u6578\u64da\u548c\u767c\u9001 (&hellip;","_links":{"self":[{"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/posts\/1830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/comments?post=1830"}],"version-history":[{"count":17,"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/posts\/1830\/revisions"}],"predecessor-version":[{"id":4061,"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/posts\/1830\/revisions\/4061"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/media\/1820"}],"wp:attachment":[{"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/media?parent=1830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/categories?post=1830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecloudedge.com\/en\/wp-json\/wp\/v2\/tags?post=1830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}