Skip to content

Commit 1f1a2a6

Browse files
Update PE OpenAPI spec (from master)
1 parent c1ca8c7 commit 1f1a2a6

4 files changed

Lines changed: 318 additions & 7 deletions

File tree

pe/docs/AiChatControllerApi.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ com.fasterxml.jackson.databind.JsonNode createChat(@Nonnull Object body) // crea
77
void deleteChat(@Nonnull UUID chatId) // deleteChat
88
com.fasterxml.jackson.databind.JsonNode getChatMessages(@Nonnull UUID chatId) // getChatMessages
99
com.fasterxml.jackson.databind.JsonNode listChats(@Nonnull ChatType chatType) // listChats
10-
List<Object> sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body) // sendChatMessage
10+
List<Object> sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body, @Nullable String acceptLanguage) // sendChatMessage
1111
void updateChat(@Nonnull UUID chatId, @Nonnull Object body) // updateChat
1212
```
1313

@@ -103,7 +103,7 @@ listChats
103103
## sendChatMessage
104104

105105
```
106-
List<Object> sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body)
106+
List<Object> sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body, @Nullable String acceptLanguage)
107107
```
108108

109109
**POST** `/api/ai/chats/{chatId}/messages`
@@ -118,6 +118,7 @@ sendChatMessage
118118
| **chatId** | **UUID** | | |
119119
| **xAuthorization** | **String** | | |
120120
| **body** | **String** | | |
121+
| **acceptLanguage** | **String** | | [optional] |
121122

122123
### Return type
123124

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# AiDeviceDashboardControllerApi
2+
3+
`ThingsboardClient` methods:
4+
5+
```
6+
com.fasterxml.jackson.databind.JsonNode generateDashboard(@Nonnull UUID deviceId, @Nonnull String xAuthorization, @Nonnull Object body) // generateDashboard
7+
```
8+
9+
10+
## generateDashboard
11+
12+
```
13+
com.fasterxml.jackson.databind.JsonNode generateDashboard(@Nonnull UUID deviceId, @Nonnull String xAuthorization, @Nonnull Object body)
14+
```
15+
16+
**POST** `/api/ai/devices/{deviceId}/dashboard`
17+
18+
generateDashboard
19+
20+
21+
### Parameters
22+
23+
| Name | Type | Description | Notes |
24+
|------------- | ------------- | ------------- | -------------|
25+
| **deviceId** | **UUID** | | |
26+
| **xAuthorization** | **String** | | |
27+
| **body** | **Object** | | |
28+
29+
### Return type
30+
31+
**com.fasterxml.jackson.databind.JsonNode**
32+

pe/spec/openapi.json

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
"name": "ai-chat-controller",
3030
"description": "Ai Chat Controller"
3131
},
32+
{
33+
"name": "ai-device-dashboard-controller",
34+
"description": "Ai Device Dashboard Controller"
35+
},
3236
{
3337
"name": "ai-model-controller",
3438
"description": "Ai Model Controller"
@@ -4397,6 +4401,14 @@
43974401
"schema": {
43984402
"type": "string"
43994403
}
4404+
},
4405+
{
4406+
"name": "Accept-Language",
4407+
"in": "header",
4408+
"required": false,
4409+
"schema": {
4410+
"type": "string"
4411+
}
44004412
}
44014413
],
44024414
"requestBody": {
@@ -4683,6 +4695,169 @@
46834695
]
46844696
}
46854697
},
4698+
"/api/ai/devices/{deviceId}/dashboard": {
4699+
"post": {
4700+
"tags": [
4701+
"ai-device-dashboard-controller"
4702+
],
4703+
"summary": "generateDashboard",
4704+
"operationId": "generateDashboard",
4705+
"parameters": [
4706+
{
4707+
"name": "deviceId",
4708+
"in": "path",
4709+
"required": true,
4710+
"schema": {
4711+
"type": "string",
4712+
"format": "uuid"
4713+
}
4714+
},
4715+
{
4716+
"name": "X-Authorization",
4717+
"in": "header",
4718+
"required": true,
4719+
"schema": {
4720+
"type": "string"
4721+
}
4722+
}
4723+
],
4724+
"requestBody": {
4725+
"content": {
4726+
"application/json": {
4727+
"schema": {
4728+
"$ref": "#/components/schemas/JsonNode"
4729+
}
4730+
}
4731+
},
4732+
"required": true
4733+
},
4734+
"responses": {
4735+
"200": {
4736+
"description": "OK",
4737+
"content": {
4738+
"application/json": {
4739+
"schema": {
4740+
"$ref": "#/components/schemas/JsonNode"
4741+
}
4742+
}
4743+
}
4744+
},
4745+
"400": {
4746+
"description": "Bad Request",
4747+
"content": {
4748+
"application/json": {
4749+
"schema": {
4750+
"$ref": "#/components/schemas/ThingsboardErrorResponse"
4751+
},
4752+
"examples": {
4753+
"error-code-400": {
4754+
"summary": "Bad Request",
4755+
"value": {
4756+
"status": 400,
4757+
"message": "Invalid request body",
4758+
"errorCode": 31,
4759+
"timestamp": 1609459200000
4760+
}
4761+
}
4762+
}
4763+
}
4764+
}
4765+
},
4766+
"401": {
4767+
"description": "Unauthorized",
4768+
"content": {
4769+
"application/json": {
4770+
"schema": {
4771+
"$ref": "#/components/schemas/ThingsboardErrorResponse"
4772+
},
4773+
"examples": {
4774+
"error-code-401": {
4775+
"summary": "Unauthorized",
4776+
"value": {
4777+
"status": 401,
4778+
"message": "Authentication failed",
4779+
"errorCode": 10,
4780+
"timestamp": 1609459200000
4781+
}
4782+
}
4783+
}
4784+
}
4785+
}
4786+
},
4787+
"403": {
4788+
"description": "Forbidden",
4789+
"content": {
4790+
"application/json": {
4791+
"schema": {
4792+
"$ref": "#/components/schemas/ThingsboardErrorResponse"
4793+
},
4794+
"examples": {
4795+
"error-code-403": {
4796+
"summary": "Forbidden",
4797+
"value": {
4798+
"status": 403,
4799+
"message": "You don't have permission to perform this operation!",
4800+
"errorCode": 20,
4801+
"timestamp": 1609459200000
4802+
}
4803+
}
4804+
}
4805+
}
4806+
}
4807+
},
4808+
"404": {
4809+
"description": "Not Found",
4810+
"content": {
4811+
"application/json": {
4812+
"schema": {
4813+
"$ref": "#/components/schemas/ThingsboardErrorResponse"
4814+
},
4815+
"examples": {
4816+
"error-code-404": {
4817+
"summary": "Not Found",
4818+
"value": {
4819+
"status": 404,
4820+
"message": "Requested item wasn't found!",
4821+
"errorCode": 32,
4822+
"timestamp": 1609459200000
4823+
}
4824+
}
4825+
}
4826+
}
4827+
}
4828+
},
4829+
"429": {
4830+
"description": "Too Many Requests",
4831+
"content": {
4832+
"application/json": {
4833+
"schema": {
4834+
"$ref": "#/components/schemas/ThingsboardErrorResponse"
4835+
},
4836+
"examples": {
4837+
"error-code-429": {
4838+
"summary": "Too Many Requests",
4839+
"value": {
4840+
"status": 429,
4841+
"message": "Too many requests for current tenant!",
4842+
"errorCode": 33,
4843+
"timestamp": 1609459200000
4844+
}
4845+
}
4846+
}
4847+
}
4848+
}
4849+
}
4850+
},
4851+
"security": [
4852+
{
4853+
"HttpLoginForm": []
4854+
},
4855+
{
4856+
"ApiKeyForm": []
4857+
}
4858+
]
4859+
}
4860+
},
46864861
"/api/ai/model": {
46874862
"get": {
46884863
"tags": [

0 commit comments

Comments
 (0)