Elasticsearch DXL Service 0.2.0

Elasticsearch service for use with the OpenDXL Python Client

Overview

The Elasticsearch DXL Python service exposes access to the Elasticsearch REST APIs via the Data Exchange Layer (DXL) fabric. The service also provides support for storing event notifications received from the DXL fabric to Elasticsearch.

Documentation

See the Wiki for an overview of the Elasticsearch API DXL Python service and usage examples.


See the Elasticsearch DXL Python service documentation for installation instructions, API documentation, and usage examples.

  • Version 0.2.0

    Elasticsearch DXL Python Service 0.2.0 Release

    • Updated to support both Python 2 and 3
  • Version 0.1.0

Bootprint

Elasticsearch DXL Service

Version: 0.1.0

The OpenDXL Elasticsearch service exposes access to the Elasticsearch REST APIs via the Data Exchange Layer (DXL) fabric. The service also provides support for storing event notifications received from the DXL fabric to Elasticsearch.

Solutions

Elasticsearch DXL Service

Services

Elasticsearch DXL Service

Events

<User-Defined-Topic(s)>

The OpenDXL Elasticsearch service can be configured to subscribe to a set of topics and automatically store the payload in a document on the Elasticsearch server.

For more information please see the Elasticsearch DXL Python Service SDK: Configuration page. Specifically, the dxlelasticsearchservice.config section.

payload: object

{
"event_id": "basic-event-example-id",
"message": "Hello from OpenDXL",
"source": "Basic Event Example"
}

Requests

/opendxl-elasticsearch/service/elasticsearch-api/delete

Invokes an Elasticsearch 'delete' command and returns the results. Check the Elasticsearch API Reference for usable key/value parameters (formatted as a JSON string, see example payload below).

Elasticsearch Python API Reference: 'delete'

payload: object

{
"doc_type": "basic-example-doc",
"id": "12345",
"index": "opendxl-elasticsearch-service-examples"
}

The contents of the DXL response payload are provided as a JSON string form of the response provided by the Elasticsearch API. Please see the Elasticsearch API Reference for further details.

payload: object

{
"_id": "12345",
"_index": "opendxl-elasticsearch-client-examples",
"_shards": {
"failed": 0,
"successful": 2,
"total": 2
}
,
"_type": "basic-example-doc",
"_version": 2,
"found": true,
"result": "deleted"
}
Error Code: 0

payload: object

Error response specific to exceptions thrown by the libraries used by the Elasticsearch DXL Python Service. Additional error information is present in the Error Response message's 'error_message' property.

{
"class": "Elasticsearch",
"module": "elasticsearch"
}
module: string

The Python module containing the method in which the error occurred.

class: string

The Python class containing the method in which the error occurred.

/opendxl-elasticsearch/service/elasticsearch-api/get

Invokes an Elasticsearch 'get' command and returns the results. Check the Elasticsearch API Reference for usable key/value parameters (formatted as a JSON string, see example payload below).

Elasticsearch Python API Reference: 'get'

payload: object

{
"doc_type": "basic-example-doc",
"id": "basic-example-id",
"index": "opendxl-elasticsearch-service-examples"
}

The contents of the DXL response payload are provided as a JSON string form of the response provided by the Elasticsearch API. Please see the Elasticsearch API Reference for further details.

payload: object

{
"_id": "basic-example-id",
"_index": "opendxl-elasticsearch-service-examples",
"_source": {
"event_id": "basic-example-id",
"message": "Hello from OpenDXL",
"source": "Basic Example"
}
,
"_type": "basic-example-doc",
"_version": 1,
"found": true
}
Error Code: 0

payload: object

Error response specific to exceptions thrown by the libraries used by the Elasticsearch DXL Python Service. Additional error information is present in the Error Response message's 'error_message' property.

{
"class": "Elasticsearch",
"module": "elasticsearch"
}
module: string

The Python module containing the method in which the error occurred.

class: string

The Python class containing the method in which the error occurred.

/opendxl-elasticsearch/service/elasticsearch-api/index

Invokes an Elasticsearch 'index' command and returns the results. Check the Elasticsearch API Reference for usable key/value parameters (formatted as a JSON string, see example payload below).

Elasticsearch Python API Reference: 'index'

payload: object

{
"body": {
"message": "Hello from OpenDXL",
"source": "Basic Index Example"
}
,
"doc_type": "basic-example-doc",
"id": "12345",
"index": "opendxl-elasticsearch-service-examples"
}

The contents of the DXL response payload are provided as a JSON string form of the response provided by the Elasticsearch API. Please see the Elasticsearch API Reference for further details.

payload: object

{
"_id": "12345",
"_index": "opendxl-elasticsearch-service-examples",
"_shards": {
"failed": 0,
"successful": 2,
"total": 2
}
,
"_type": "basic-example-doc",
"_version": 1,
"created": true,
"result": "created"
}
Error Code: 0

payload: object

Error response specific to exceptions thrown by the libraries used by the Elasticsearch DXL Python Service. Additional error information is present in the Error Response message's 'error_message' property.

{
"class": "Elasticsearch",
"module": "elasticsearch"
}
module: string

The Python module containing the method in which the error occurred.

class: string

The Python class containing the method in which the error occurred.

/opendxl-elasticsearch/service/elasticsearch-api/update

Invokes an Elasticsearch 'update' command and returns the results. Check the Elasticsearch API Reference for usable key/value parameters (formatted as a JSON string, see example payload below).

Elasticsearch Python API Reference: 'update'

payload: object

{
"body": {
"doc": {
"source": "Basic Update Example"
}
}
,
"doc_type": "basic-example-doc",
"id": "12345",
"index": "opendxl-elasticsearch-service-examples"
}

The contents of the DXL response payload are provided as a JSON string form of the response provided by the Elasticsearch API. Please see the Elasticsearch API Reference for further details.

payload: object

{
"_id": "12345",
"_index": "opendxl-elasticsearch-service-examples",
"_shards": {
"failed": 0,
"successful": 2,
"total": 2
}
,
"_type": "basic-example-doc",
"_version": 2,
"result": "updated"
}
Error Code: 0

payload: object

Error response specific to exceptions thrown by the libraries used by the Elasticsearch DXL Python Service. Additional error information is present in the Error Response message's 'error_message' property.

{
"class": "Elasticsearch",
"module": "elasticsearch"
}
module: string

The Python module containing the method in which the error occurred.

class: string

The Python class containing the method in which the error occurred.

Definitions

Elasticsearch Service Error Response Object: object

Error response specific to exceptions thrown by the libraries used by the Elasticsearch DXL Python Service. Additional error information is present in the Error Response message's 'error_message' property.

{
"class": "Elasticsearch",
"module": "elasticsearch"
}
module: string

The Python module containing the method in which the error occurred.

class: string

The Python class containing the method in which the error occurred.