Sources

GET /v1/source/status

Description

Fetch health and logs for all defined sources.

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Example Response

{}

GET /v1/source/status/{id}

Description

Get health and logs data for a given source.

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Path Parameters

Param

Type

Required

Description

id

uuid

yes

ID of the source

Example Response

{}

PUT /v1/source/{id}/pause

Description

No response body, only 200 on success, otherwise a blunder error is returned on non-200 codes

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Path Parameters

Param

Type

Required

Description

id

string

yes

ID of the source you want to pause

CURL

Path Parameters

  • RequestVariable should respect the following schema:

PUT /v1/source/{id}/resume

Description

No response body, only 200 on success, otherwise a blunder error is returned on non-200 codes

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token

Path Parameters

Param

Type

Required

Description

id

string

yes

ID of the source you want to resume

PUT /v1/source

Description

Update a source's configuration.

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Body parameters

Param

Type

Required

Description

instance_count

int

no

1 or 2. Changes the number of plumber instances ran

plumber_version

string

no

Changes the version of the plumber docker image running

plumber_args

object

no

If specified, ALL plumber arguments must be passed. The value in the database will be overwritten

Example Response

{}

DELETE /v1/source/{id}

Description

No response is returned, only 200 on success.

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Example Response

Empty response body.

GET /v1/help/plumber-args

Description

When creating a source, a list of environment variables and values must be passed which define how plumber acts.

This endpoint lists all available arguments under a key->value object where the key is the relay type.

There is also a shared key with variables that must be passed for all source types

Under each key is another key->value object of PLUMBER_ENVAR -> Variable Info objects which contains additional information about the variable

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Example response

{
    "shared": {
        "PLUMBER_RELAY_TYPE": {
            "order_key": 1,
            "description": "Type of collector to use. Ex: rabbit, kafka, aws-sqs",
            "required": true,
            "type": "string"
        }
    },
    "aws-sqs": {
        "PLUMBER_RELAY_SQS_AUTO_DELETE": {
            "order_key": 5,
            "description": "Delete read/received messages",
            "required": false,
            "type": "string"
        },
        "PLUMBER_RELAY_SQS_MAX_NUM_MESSAGES": {
            "order_key": 3,
            "description": "Max number of messages to read",
            "required": false,
            "type": "int"
        },
        "PLUMBER_RELAY_SQS_QUEUE_NAME": {
            "order_key": 1,
            "description": "Queue name",
            "required": true,
            "type": "string"
        },
        "PLUMBER_RELAY_SQS_RECEIVE_REQUEST_ATTEMPT_ID": {
            "order_key": 4,
            "description": "An id to identify this read request by",
            "required": false,
            "type": "string"
        },
        "PLUMBER_RELAY_SQS_REMOTE_ACCOUNT_ID": {
            "order_key": 2,
            "description": "Remote AWS account ID",
            "required": false,
            "type": "string"
        }
    },

}

Variable Info Objects

The key is name of the input field

order_key - Defines the order in which the field should be presented in the form to the user. Maps in golang cannot be ordered, so the output of this endpoint will vary each time it is called

description - Description of the field to display to the customer

required - Boolean indicating that the key and value must be passed to create calls

type - Either "string", "int", or "bool". Bools should display as a switch/checkbox. Ints should be a text box, but with validation to ensure only numbers are entered.

POST /v1/source

Description

Create a new source (hosted plumber) resource.

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Body Parameters

Param

Type

Required

Description

name

string

yes

Friendly name used for client display only

type

string

yes

Only accepts plumber currently

inastance_count

int

yes

Number of plumber instances to run, 1 or 2

collection_id

uuid

yes

The collection that this source will feed in to

plumber_version

string

yes

Plumber docker container tag to run. Just pass latest for now

plumber_args

object

yes

Key->Value JSON object of plumber environment variables to run plumber with. These can be obtained from /v1/help/plumber-args. ALL VALUES MUST BE STRINGS

Example response

{
    "id": "e6f14c9e-88b8-481e-b650-e9c55f2b4774",
    "type": "plumber",
    "name": "My Kafka Source",
    "instance_count": 1,
    "paused": false,
    "plumber_version": "latest",
    "plumber_args": {
        "PLUMBER_RELAY_KAFKA_ADDRESS": "localhost:9000",
        "PLUMBER_RELAY_KAFKA_TOPIC": "testing",
        "PLUMBER_RELAY_TOKEN": "c745eae3-8ed5-47d7-a27e-a7d4c876257e",
        "PLUMBER_RELAY_TYPE": "kafka"
    },
    "inserted_at": "2021-05-06T21:07:28.123749Z",
    "updated_at": "2021-05-06T21:07:28.123749Z",
    "team": {
        "id": "7cf162ac-ea51-4095-9eab-d36241ef2bf0",
        "name": "test-123",
        "inserted_at": "0001-01-01T00:00:00Z",
        "updated_at": "0001-01-01T00:00:00Z"
    },
    "author": {
        "id": "30da7b29-8a8d-470e-a94a-dce003018a01",
        "name": "mark test",
        "email": "mark-new@batch.sh"
    },
    "collection": {
        "id": "9e938aa7-5014-428b-9dac-bcfa821c30cf",
        "name": "newtest2",
        "notes": "",
        "token": "c745eae3-8ed5-47d7-a27e-a7d4c876257e",
        "paused": false,
        "schema_id": "a2dd7760-5907-4505-8813-42543b40ebec"
    }
}

GET - /v1/source/{id}

Description

Retrieve all information about a single source.

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Path Parameters

Param

Type

Required

Description

id

uuid

yes

ID of the source you want to fetch

Example Response

{
    "id": "e6f14c9e-88b8-481e-b650-e9c55f2b4774",
    "type": "plumber",
    "name": "post test",
    "instance_count": 1,
    "paused": true,
    "plumber_version": "latest",
    "plumber_args": {
        "PLUMBER_RELAY_KAFKA_ADDRESS": "localhost:9000",
        "PLUMBER_RELAY_KAFKA_TOPIC": "testing",
        "PLUMBER_RELAY_TOKEN": "c745eae3-8ed5-47d7-a27e-a7d4c876257e",
        "PLUMBER_RELAY_TYPE": "kafka"
    },
    "inserted_at": "2021-05-06T21:07:28.123749Z",
    "updated_at": "2021-05-06T21:20:11.146289Z",
    "team": {
        "id": "7cf162ac-ea51-4095-9eab-d36241ef2bf0",
        "name": "test-123",
        "inserted_at": "0001-01-01T00:00:00Z",
        "updated_at": "0001-01-01T00:00:00Z"
    },
    "author": {
        "id": "30da7b29-8a8d-470e-a94a-dce003018a01",
        "name": "mark test",
        "email": "mark-new@batch.sh"
    },
    "collection": {
        "id": "9e938aa7-5014-428b-9dac-bcfa821c30cf",
        "name": "newtest2",
        "notes": "",
        "token": "c745eae3-8ed5-47d7-a27e-a7d4c876257e",
        "paused": false,
        "schema_id": "a2dd7760-5907-4505-8813-42543b40ebec"
    }
}

GET - /v1/source

Description

Get all defined sources.

Header Parameters

Param

Type

Required

Description

Authorization

string

yes

Bearer token containing API key

Example Response

[
    {
        "id": "e6f14c9e-88b8-481e-b650-e9c55f2b4774",
        "type": "plumber",
        "name": "post test",
        "instance_count": 1,
        "paused": true,
        "plumber_version": "latest",
        "plumber_args": {
            "PLUMBER_RELAY_KAFKA_ADDRESS": "localhost:9000",
            "PLUMBER_RELAY_KAFKA_TOPIC": "testing",
            "PLUMBER_RELAY_TOKEN": "c745eae3-8ed5-47d7-a27e-a7d4c876257e",
            "PLUMBER_RELAY_TYPE": "kafka"
        },
        "inserted_at": "2021-05-06T21:07:28.123749Z",
        "updated_at": "2021-05-06T21:20:11.146289Z",
        "team": {
            "id": "7cf162ac-ea51-4095-9eab-d36241ef2bf0",
            "name": "test-123",
            "inserted_at": "0001-01-01T00:00:00Z",
            "updated_at": "0001-01-01T00:00:00Z"
        },
        "author": {
            "id": "30da7b29-8a8d-470e-a94a-dce003018a01",
            "name": "mark test",
            "email": "mark-new@batch.sh"
        },
        "collection": {
            "id": "9e938aa7-5014-428b-9dac-bcfa821c30cf",
            "name": "newtest2",
            "notes": "",
            "token": "c745eae3-8ed5-47d7-a27e-a7d4c876257e",
            "paused": false,
            "schema_id": "a2dd7760-5907-4505-8813-42543b40ebec"
        }
    }
]

Last updated