1
+ {
2
+ "dj-query-catalog" : [
3
+ {
4
+ "title" : " query catalog" ,
5
+ "description" : " a query on database 'dj/northwind' called 'group', executable for the 'authenticated' role" ,
6
+ "file" : " model/dj-query-catalog/group.json" ,
7
+ "code" : {
8
+ "ID" : " group" ,
9
+ "database" : " dj/northwind" ,
10
+ "query" : " SELECT CUSTOMERS.COUNTRY, COUNT(*) AS \" Number of Customers\" FROM CUSTOMERS GROUP BY CUSTOMERS.COUNTRY" ,
11
+ "roles" : [
12
+ " authenticated"
13
+ ],
14
+ "type" : " read"
15
+ }
16
+ },
17
+ {
18
+ "title" : " query catalog" ,
19
+ "description" : " a query on database 'dj/northwind' called 'list'. Parameters limit and offset can be passed to the query" ,
20
+ "file" : " model/dj-query-catalog/list.json" ,
21
+ "code" : {
22
+ "ID" : " list" ,
23
+ "database" : " dj/northwind" ,
24
+ "query" : " select * from CATEGORIES limit ${limit} offset ${offset}" ,
25
+ "type" : " read" ,
26
+ "arguments" : {
27
+ "limit" : {
28
+ "type" : " number" ,
29
+ "sample" : " 5"
30
+ },
31
+ "offset" : {
32
+ "type" : " number" ,
33
+ "sample" : " 0"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ],
39
+ "dj-database" : [
40
+ {
41
+ "title" : " database definition" ,
42
+ "description" : " postgres database connection information with encrypted password" ,
43
+ "file" : " model/dj-database/dj%2Fpostgres.json" ,
44
+ "code" : {
45
+ "name" : " postgres" ,
46
+ "djClassName" : " org.dashjoin.service.SQLDatabase" ,
47
+ "username" : " postgres" ,
48
+ "url" : " jdbc:postgresql://localhost:5432/postgres" ,
49
+ "ID" : " dj/postgres" ,
50
+ "password" : " DJ1#\b /gbzX8DDZa1lVaiLat0HdX9cDST2KHJk"
51
+ }
52
+ }
53
+ ],
54
+ "dj-function" : [
55
+ {
56
+ "title" : " Function catalog: Invoke" ,
57
+ "description" : " Function that adds two numbers passed in the argument object. It can be called via $call('add') or via REST" ,
58
+ "file" : " model/dj-function/add.json" ,
59
+ "code" : {
60
+ "ID" : " add" ,
61
+ "djClassName" : " org.dashjoin.function.Invoke" ,
62
+ "expression" : " {'result': x+y}" ,
63
+ "roles" : [
64
+ " authenticated"
65
+ ],
66
+ "type" : " read"
67
+ }
68
+ },
69
+ {
70
+ "title" : " Function catalog: RestJson" ,
71
+ "description" : " Function that calls a web service. The fields of the function argument are used to construct the URL via from string template" ,
72
+ "file" : " model/dj-function/address.json" ,
73
+ "code" : {
74
+ "djClassName" : " org.dashjoin.function.RestJson" ,
75
+ "url" : " https://api.geoapify.com/v1/geocode/search?street=${street}&postcode=${postcode}&city=${city}&country=${country}&apiKey=..." ,
76
+ "method" : " GET" ,
77
+ "contentType" : " application/json" ,
78
+ "ID" : " address"
79
+ }
80
+ },
81
+ {
82
+ "title" : " Function catalog: Credentials" ,
83
+ "description" : " Encrypted credentials for OpenAI to be used in $curl and $chat functions" ,
84
+ "file" : " model/dj-function/openai.json" ,
85
+ "code" : {
86
+ "ID" : " openai" ,
87
+ "djClassName" : " org.dashjoin.function.Credentials" ,
88
+ "username" : " Authorization" ,
89
+ "password" : " DJ1#\b 7Zw3EGtmVKaDuwwOtwXfWDG1y+awbon7WNQp9NmJ6EgUXEpYUMC8O7zRUw2kSnDxyATO0R3ke3NxjaT9zCwYyDGS5VDgYt/L" ,
90
+ "apiKey" : true
91
+ }
92
+ },
93
+ {
94
+ "title" : " Function catalog: ETL" ,
95
+ "description" : " Extract load transform function. Loads the result of 'expression' into the database sqlite. The data is mapped using 'mappings'" ,
96
+ "file" : " model/dj-function/misp.json" ,
97
+ "code" : {
98
+ "djClassName" : " com.dashjoin.function.ETL" ,
99
+ "database" : " sqlite" ,
100
+ "ID" : " misp" ,
101
+ "type" : " write" ,
102
+ "oldData" : " Delete All" ,
103
+ "createSchema" : true ,
104
+ "mappings" : {
105
+ "MISP_Event" : {
106
+ "sourceTable" : " table" ,
107
+ "extractColumn" : null ,
108
+ "extractKey" : null ,
109
+ "pk" : " uuid" ,
110
+ "rowMapping" : null ,
111
+ "rowFilter" : null
112
+ }
113
+ },
114
+ "expressions" : {
115
+ "expression" : " $openJson(\" https://www.circl.lu/doc/misp/feed-osint/0b988513-9535-42f0-9ebc-5d6aec2e1c79.json\" ).Event.Attribute"
116
+ }
117
+ }
118
+ },
119
+ {
120
+ "title" : " Function catalog: Email" ,
121
+ "description" : " Configures an SMTP server" ,
122
+ "file" : " model/dj-function/email.json" ,
123
+ "code" : {
124
+ "djClassName" : " org.dashjoin.function.Email" ,
125
+ "ID" : " email" ,
126
+ "type" : " write" ,
127
+ "properties" : {
128
+ "mail.smtp.port" : " 25"
129
+ },
130
+ "username" : " user" ,
131
+ "password" : " DJ1#\b tW06MCaBJjnRvgvGgTaTpQ=="
132
+ }
133
+ }
134
+ ]
135
+ }
0 commit comments