Skip to content

Commit 9765c10

Browse files
committing update to read me file
1 parent 18dd6dc commit 9765c10

1 file changed

Lines changed: 36 additions & 29 deletions

File tree

README.md

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,87 @@
1-
#kdb-rest-service
1+
# kdb-rest-service
22

33
This is an open source rest service written in java which can be used to connect to an instance of kdb using json. The rest service can provide a single query to run or call a function predefined on the instance of kdb.
44

5-
##Pre-requisite Configuration
6-
#####Properties
5+
## Pre-requisite Configuration
6+
##### Properties
77
There is an application.properties file in the resources folder, connect the rest service and the instance of kdb by updating the properties below:
88

9-
kdb.host=localhost
9+
kdb.host=localhost
1010

11-
kdb.port=6007
11+
kdb.port=6007
1212

13-
kdb.username=admin
13+
kdb.username=admin
1414

15-
kdb.password=admin
15+
kdb.password=admin
1616

17-
server.port=8080
17+
server.port=8080
1818

1919

20-
#####EndPoints
20+
##### EndPoints
2121
The kdb-rest-service provides two endpoints:executeFunction and executeQuery.
2222

2323
The executeFunction provides a means to call a predefined function and pass parameters to the kdb instance.
2424
For example this is the format of a request call a function called plus which passes two arguments labelled "xarg" and "yarg" with values 96.3 and 9.7:
2525

2626
e.g.
2727
{
28-
"function_name" : "plus",
29-
"arguments" : {
30-
"xarg" : "96.3",
31-
"yarg" : "9.7"
28+
29+
"function_name" : "plus",
30+
"arguments" :
31+
{
32+
"xarg" : "96.3",
33+
"yarg" : "9.7"
3234
}
3335
}
3436

3537
The executeQuery provides a means to provide a query to the kdb instance, by default this endpoint is disabled using the property freeform.query.mode.enabled, to enable change the value to true.
3638
For example this is the format of a synchronous query request where the user expects a response to be returned:
3739

40+
e.g.
3841
{
39-
"type" : "sync",
40-
"query" : "select from table",
41-
"response" : true
42+
43+
"type" : "sync",
44+
45+
"query" : "select from table",
46+
47+
"response" : true
48+
4249
}
4350

44-
#####Certificates
51+
##### Certificates
4552
The requests are sent in HTTPS format and to provide this the project has a self-signed certifiate embedded within. It is strongly recommended that you add your own certificate. Updating the certificate will require and update to the following properties in application.properties:
4653

47-
security.require-ssl=true
54+
security.require-ssl=true
4855

49-
server.ssl.key-store-type=PKCS12
56+
server.ssl.key-store-type=PKCS12
5057

51-
server.ssl.key-store=classpath:keystore.p12
58+
server.ssl.key-store=classpath:keystore.p12
5259

53-
server.ssl.key-store-password=aquaq2018
60+
server.ssl.key-store-password=aquaq2018
5461

55-
server.ssl.key-alias=tomcat
62+
server.ssl.key-alias=tomcat
5663

57-
#####Authentication
64+
##### Authentication
5865
The rest service uses basic authentication and is using a single username and password which are configured in the application.properties file:
5966

60-
basic.authentication.user=user
67+
basic.authentication.user=user
6168

62-
basic.authentication.password=pass
69+
basic.authentication.password=pass
6370

6471
These value are provided within the header of the request, it is strongly recommended to invoke your own security if you use the project.
6572

6673

67-
##Deploying
74+
## Deploying
6875

6976
There is a DockerFile within the project for deploying the project on docker.
7077

7178
Alternatively it can be run locally by providing the appropriate build configuration via command line or ide.
7279

73-
##Built with
80+
## Built with
7481
Maven
7582

76-
##Licensing
83+
## Licensing
7784
Please see license file.
7885

79-
##Contributing
86+
## Contributing
8087
The branch is currently locked down and will require a pull request reviewed by a member of the aquaq team before any changes can be committed.

0 commit comments

Comments
 (0)