Adds Swagger docs for new `/api/v1/aclk` endpoint (#11881)
Timotej S committed
Dec 14, 2021 at 12:16 UTC
70d38f31679894b6dfe580bda6fb3972dfcf553f
2 files changed
+106
web/api/netdata-swagger.json
+60
@@ -1067,6 +1067,24 @@
1067
}
1068
}
1069
}
1070
+ },
1071
+ "/aclk": {
1072
+ "get": {
1073
+ "summary": "Get information about current ACLK state",
1074
+ "description": "aclk endpoint returns detailed information about current state of ACLK (Agent to Cloud communication).",
1075
+ "responses": {
1076
+ "200": {
1077
+ "description": "JSON object with ACLK information.",
1078
+ "content": {
1079
+ "application/json": {
1080
+ "schema": {
1081
+ "$ref": "#/components/schemas/aclk_state"
1082
+ }
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ }
1088
}
1089
},
1090
"servers": [
@@ -2059,6 +2077,48 @@
2077
}
2078
}
2079
}
2080
+ },
2081
+ "aclk_state": {
2082
+ "type": "object",
2083
+ "properties": {
2084
+ "aclk-available": {
2085
+ "type": "boolean",
2086
+ "description": "Describes whether this agent is capable of connection to the Cloud. False means agent has been built without ACLK component either on purpose (user choice) or due to missing dependency."
2087
+ },
2088
+ "aclk-implementation": {
2089
+ "type": "string",
2090
+ "description": "Describes which ACLK implementation is currently used.",
2091
+ "enum": [
2092
+ "Next Generation",
2093
+ "Legacy"
2094
+ ]
2095
+ },
2096
+ "new-cloud-protocol-supported": {
2097
+ "type": "boolean",
2098
+ "description": "Informs about new protobuf based Cloud/Agent protocol support of this agent. If false agent has to be compiled with protobuf and protoc available."
2099
+ },
2100
+ "agent-claimed": {
2101
+ "type": "boolean",
2102
+ "description": "Informs whether this agent has been added to a space in the cloud (User has to perform claiming). If false (user didnt perform claiming) agent will never attempt any cloud connection."
2103
+ },
2104
+ "claimed-id": {
2105
+ "type": "string",
2106
+ "format": "uuid",
2107
+ "description": "Unique ID this agent uses to identify when connecting to cloud"
2108
+ },
2109
+ "online": {
2110
+ "type": "boolean",
2111
+ "description": "Informs if this agent was connected to the cloud at the time this request has been processed."
2112
+ },
2113
+ "used-cloud-protocol": {
2114
+ "type": "string",
2115
+ "description": "Informs which protocol is used to communicate with cloud",
2116
+ "enum": [
2117
+ "Old",
2118
+ "New"
2119
+ ]
2120
+ }
2121
+ }
2122
}
2123
}
2124
}
web/api/netdata-swagger.yaml
+46
@@ -865,6 +865,18 @@ paths:
865
description: A plain text response based on the result of the command.
866
"403":
867
description: Bearer authentication error.
868
+ /aclk:
869
+ get:
870
+ summary: Get information about current ACLK state
871
+ description: aclk endpoint returns detailed information
872
+ about current state of ACLK (Agent to Cloud communication).
873
+ responses:
874
+ "200":
875
+ description: JSON object with ACLK information.
876
+ content:
877
+ application/json:
878
+ schema:
879
+ $ref: "#/components/schemas/aclk_state"
880
servers:
881
- url: https://registry.my-netdata.io/api/v1
882
- url: http://registry.my-netdata.io/api/v1
@@ -1609,3 +1621,37 @@ components:
1621
- WARNING
1622
- CRITICAL
1623
- UNKNOWN
1624
+ aclk_state:
1625
+ type: object
1626
+ properties:
1627
+ aclk-available:
1628
+ type: string
1629
+ description: Describes whether this agent is capable of connection to the Cloud.
1630
+ False means agent has been built without ACLK component either on purpose (user choice) or due to missing dependency.
1631
+ aclk-implementation:
1632
+ type: string
1633
+ description: Describes which ACLK implementation is currently used.
1634
+ enum:
1635
+ - Next Generation
1636
+ - Legacy
1637
+ new-cloud-protocol-supported:
1638
+ type: boolean
1639
+ description: Informs about new protobuf based Cloud/Agent protocol support of this agent.
1640
+ If false agent has to be compiled with protobuf and protoc available.
1641
+ agent-claimed:
1642
+ type: boolean
1643
+ description: Informs whether this agent has been added to a space in the cloud (User has to perform claiming).
1644
+ If false (user didnt perform claiming) agent will never attempt any cloud connection.
1645
+ claimed_id:
1646
+ type: string
1647
+ format: uuid
1648
+ description: Unique ID this agent uses to identify when connecting to cloud
1649
+ online:
1650
+ type: boolean
1651
+ description: Informs if this agent was connected to the cloud at the time this request has been processed.
1652
+ used-cloud-protocol:
1653
+ type: string
1654
+ description: Informs which protocol is used to communicate with cloud
1655
+ enum:
1656
+ - Old
1657
+ - New