JSON push sink

The JSON push sink implements a simple HTTP based protocol where individual entities or lists of entities are POSTed as JSON data to an HTTP endpoint.

The protocol is described in additional detail in the JSON Push Protocol document. The serialisation of entities as JSON is described in more detail here.

Consider using the more general REST sink if you’re interacting with a non-Sesam JSON capable REST api.

This sink is compatible with The HTTP endpoint source.

This sink supports batching.

Prototype

{
    "type": "json",
    "system": "url-system-id",
    "url": "url-to-http-endpoint",
    "headers": {
        "some-header": "some-value"
    },
    "batch_size": 100
}

Properties

Property

Type

Description

Default

Req

system

String

The id of the URL system component to use.

Yes

url

String

The full URL to HTTP service implementing the JSON push protocol described.

Yes

batch_size

Integer

The maximum number of entities to POST in each request. If there are more entities than this then they’ll be split across multiple HTTP requests.

100

headers

Dict<String,String>

An optional set of header values to set in HTTP request made using this sink. Both keys and values must evaluate to strings.

Example configuration

The outermost object would be your pipe configuration, which is omitted here for brevity:

{
    "sink": {
        "type": "json",
        "url": "http://localhost:9042/api/receivers/foo/entities"
    }
}

An example using a custom “application/json” content-type header needed by some non-standard compliant servers:

{
    "sink": {
        "type": "json",
        "url": "http://localhost:9042/api/receivers/foo/entities",
        "headers": {
            "content-type": "application/json; charset=UTF-8"
        }
    }
}