Skip to content

Commit a2d14ed

Browse files
author
Chris Wiechmann
committed
Initial version of the elasticsearch connector
1 parent 4777baf commit a2d14ed

21 files changed

+3326
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
![Elasticsearch Tests](https://github.com/Axway-API-Builder-Ext/api-builder-extras/workflows/elel%20Maps%20Tests/badge.svg)
2+
3+
# API-Builder Elasticsearch Connector
4+
5+
Integrate Elasticsearch information into your [API-Builder flow][1] using this connector.
6+
7+
## Configuration
8+
9+
After installation and restarting your API-Builder project you get the following new flow-nodes:
10+
![Node][img1]
11+
Before you can make use it in your flow you have to configure your Elasticsearch instance in your API-Builder project.
12+
13+
During installation a new config file has been automatically created which must be completed with your Elasticsearch instance. You can do that directly from within the API-Builder UI:
14+
![Config][img3]
15+
We recommend to setup your configuration in a [environmentalized][4] way keeping [sensitive information][5] away from the source-code repository.
16+
17+
## Elasticsearch
18+
This Connector is based on the https://www.elastic.co/blog/new-elasticsearch-javascript-client-released project. It's a good starting point to understand the APIs and their parameters reading the following documentation:
19+
20+
- [Introduction](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.x/introduction.html)
21+
22+
As of today, the flow node only supports the [search API](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.x/api-reference.html#_search) described here:
23+
24+
## Tests
25+
The project is mocking an Elastic-Search instance to execute tests and validate parameters and responses are handled correclty.
26+
And run the following command:
27+
`npm test`
28+
The tests are also automatically executed on every commit to this project.
29+
30+
## Compatibility
31+
Tested with Elasticsearch 7.4.0
32+
Requires API-Builder Independence or higher
33+
34+
## Changelog
35+
- 1.0.0 - 13.03.2020
36+
- Initial version
37+
38+
## Limitations/Caveats
39+
Only the search API is currently supported
40+
Authentication to the Elasticsearch instance is currently not supported
41+
42+
If you require on the of the unsupported APIs or authentication don't hestitate to create an [issue][3]
43+
44+
## Contributing
45+
46+
Please read [Contributing.md](https://github.com/Axway-API-Management-Plus/Common/blob/master/Contributing.md) for details on our code of conduct, and the process for submitting pull requests to us.
47+
48+
## Team
49+
50+
![alt text][Axwaylogo] Axway Team
51+
52+
[Axwaylogo]: https://github.com/Axway-API-Management/Common/blob/master/img/AxwayLogoSmall.png "Axway logo"
53+
54+
[1]: https://docs.axway.com/bundle/API_Builder_4x_allOS_en/page/api_builder_flows.html
55+
[2]: https://docs.axway.com/bundle/API_Builder_4x_allOS_en/page/api_builder_getting_started_guide.html
56+
[3]: https://github.com/Axway-API-Builder-Ext/api-builder-extras/issues
57+
[4]: https://docs.axway.com/bundle/API_Builder_4x_allOS_en/page/environmentalization.html
58+
[5]: https://docs.axway.com/bundle/API_Builder_4x_allOS_en/page/project_configuration.html#ProjectConfiguration-Configurationfiles
59+
[6]: https://console.cloud.google.com
60+
[7]: https://developers.google.com/maps/documentation/javascript/get-api-key
61+
62+
[img1]: imgs/google-maps-flownode.png
63+
[img2]: imgs/google-maps-directions.png
64+
[img3]: imgs/google-maps-config.png
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
pluginConfig: {
3+
'@axway-api-builder-ext/api-builder-plugin-fn-elasticsearch': {
4+
'elastic': {
5+
node: process.env.ELASTIC_NODE,
6+
auth: {
7+
/* Use an API-Key
8+
apiKey: process.env.ELASTIC_API_KEY
9+
or username / password based
10+
username: process.env.ELASTIC_USERNAME,
11+
username: process.env.ELASTIC_PASSWORD
12+
*/
13+
},
14+
// The name to identify the client instance in the events.
15+
name: 'api-builder'
16+
// You can use all configuration options documented here:
17+
// https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.x/client-configuration.html
18+
}
19+
}
20+
}
21+
};

0 commit comments

Comments
 (0)