You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/02/29 10:33:12 UTC

[GitHub] [skywalking] arugal commented on a change in pull request #4399: [WIP]support http api for upstream trace.

arugal commented on a change in pull request #4399: [WIP]support http api for upstream trace.
URL: https://github.com/apache/skywalking/pull/4399#discussion_r386018844
 
 

 ##########
 File path: docs/en/protocols/HTTP-API-Protocol.md
 ##########
 @@ -0,0 +1,198 @@
+# HTTP API Protocol
+
+HTTP API Protocol define the API data format, including api request and response data format.
+
+### Do register
+
+For more information about data format can be found in [Register service](https://github.com/apache/skywalking-data-collect-protocol/tree/master/register/Register.proto).
+And register steps followings [SkyWalking Trace Data Protocol v2](Trace-Data-Protocol-v2.md).
+
+- Service Register
+
+> POST http://localhost:12800/v2/service/register
+
+Input:
+
+```json
+{
+  "services": [
+    {
+      "type": "normal",
+      "serviceName": "Service Name"
+    }
+  ]
+}
+```
+
+Output JSON Array:
+
+```json
+[
+    {
+        "key": "Service Name",
+        "value": 2
+    }
+]
+```
+
+- Service instance Register
+
+> POST http://localhost:12800/v2/instance/register
+
+Input:
+
+```json
+{
+  "instances": [
+    {
+      "time": 1582428603392,
+      "instanceUUID": "NAME:Service Instance Name",
+      "properties": [
+        {
+          "key": "language",
+          "value": "Lua"
+        }
+      ],
+      "serviceId": 2
+    }
+  ]
+}
+```
+
+OutPut:
+
+```json
+{
+    "key": "NAME:Service Instance Name",
+    "value": 2
+}
 
 Review comment:
   It should be an array, right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services