This custom endpoint is included with the Jim2 distribution, but requires Happen support for configuration. Customers directly updating their database is not supported.
This endpoint supports the GET method.
URL query parameters are:
queryname
|
The name of the query to be executed.
|
pageno
|
The page number to be returned.
|
pagesize
|
The number of rows for each pages. Must be included if pageno is specified (and visa versa).
|
qp{n}
|
Query parameter number n (eg qp1=ABC). The number of required query parameters and their values will depend on the query being executed (see queryname).
|
system
|
Optional. Specifies if a system query or custom query should be executed. If omitted then preference is given to the custom query if two exist with the same queryname).
|
The custom endpoint will return a JSON document response containing the query results. The structure of the results is as follows:
resultSets
|
is an array of query results. Most queries will only have one result set. Each result set contains columns and rows.
|
columns
|
is an array of the column names and types in the results.
|
rows
|
is an array of row data, each row being an array of values.
|
|
|
Example:
GET api/v1/custom/getdata?queryname=test3&qp1=1&qp2=2024-6-17
Response:
{
"resultSets":[
{
"columns":[
{"Name":"InvNo","Type":"int"},
{"Name":"CardCode","Type":"varchar"},
{"Name":"InvAmt","Type":"money"},
{"Name":"InvDate","Type":"datetime"}
],
"rows":[
[2,"C.SIMPLE",135.3000,"\/Date(1730878800000)\/"]
]
},
{
"columns":[
{"Name":"JobNo","Type":"int"},
{"Name":"CardCode","Type":"varchar"},
{"Name":"DateIn","Type":"datetime"}
],
"rows":[
[73,"C.HASSHIP","\/Date(1732262990437)\/"],
[74,"C.SIMPLE2","\/Date(1732262990510)\/"]
]
}
]
}
Further information
Jim2 API Installation and Configuration
Jim2 API Postman Auth Example
Jim2 API After Restoring from a Backup
|