- POST ~/db/query
- Description:The query api supports the query of the SQL select statement, and the input and output of this api are in json format. It should be noted that using this api needs to carry api_token in the request header( the token will be given to the caller of the api in advance).
param |
value |
required |
desc |
Authorization |
<your_api_token> |
yes |
|
Content-Type |
application/json |
yes |
|
param |
type |
required |
desc |
query |
str |
yes |
select statement |
example:
{
"query": "SELECT PuOrderNo, Supp,Cur, SysOwner FROM puomstr LIMIT 5"
}
param |
type |
desc |
example |
columns |
array |
required fields |
|
records |
array |
the value of each row |
|
example:
{
"columns": [
"PuOrderNo",
"Supp",
"Cur",
"SysOwner"
],
"records": [
[
"093",
"FDLGS",
"RMB",
"037"
],
[
"20200403CC01",
"FXMYS",
"RMB",
"005"
],
[
"55554444",
"FHZXS",
"RMB",
"ADMIN"
],
[
"A002",
"FSHJW",
"RMB",
"037"
],
[
"A003",
"FDFBZ",
"RMB",
"037"
]
]
}