Skip to content

Commit 1a2f96f

Browse files
committed
Entities query REST API documentation
1 parent ddc7fdb commit 1a2f96f

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

docs/src/operate/registration/register.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,61 @@ GET /v1/entities/{topic-id}
8686
curl http://localhost:8000/tedge/entity-store/v1/entities/device/child01
8787
```
8888

89+
## Query Entities
90+
91+
### Query All Entities
92+
93+
List all entities registered with thin-edge starting from the `main` device.
94+
95+
**Endpoint**
96+
97+
```
98+
GET /v1/entities
99+
```
100+
101+
**Responses**
102+
103+
* 200: OK
104+
```json
105+
[
106+
{
107+
"@topic-id": "device/main//",
108+
"@type": "device"
109+
},
110+
{
111+
"@topic-id": "device/main/service/tedge-agent",
112+
"@type": "service",
113+
"@parent": "device/main//"
114+
},
115+
{
116+
"@topic-id": "device/child0//",
117+
"@type": "child-device",
118+
"@parent": "device/main//"
119+
},
120+
{
121+
"@topic-id": "device/child1//",
122+
"@type": "child-device",
123+
"@parent": "device/main//"
124+
},
125+
{
126+
"@topic-id": "device/child00//",
127+
"@type": "child-device",
128+
"@parent": "device/child0//"
129+
},
130+
{
131+
"@topic-id": "device/child01//",
132+
"@type": "child-device",
133+
"@parent": "device/child0//"
134+
}
135+
]
136+
```
137+
138+
**Example**
139+
140+
```shell
141+
curl http://localhost:8000/tedge/entity-store/v1/entities
142+
```
143+
89144
## Delete entity
90145

91146
Deleting an entity results in the deletion of its immediate and nested child entities as well, to avoid leaving orphans behind.

0 commit comments

Comments
 (0)