Skip to main content
The Connectors API is how you tell Devset where your brokers and databases live. You register a named connector once, and then reference it by name in workflows, messages, and queries. Devset supports Kafka and RabbitMQ broker connectors, MongoDB database connectors, and a set of MongoDB query endpoints for direct data access. All endpoints are relative to http://localhost:8082.

POST /connectors/configurations

Create a broker connector. Devset stores the connection details and makes the connector available by name across all other APIs.
type
string
required
Must be "kafka".
name
string
required
A unique name for this connector, such as local-kafka or staging-kafka.
bootstrapServers
string
required
Comma-separated list of Kafka bootstrap server addresses in host:port format.
username
string
Optional authentication username.
password
string
Optional authentication password.
Request example
{
  "type": "kafka",
  "name": "local-kafka",
  "bootstrapServers": "localhost:9092"
}
Response — 200 OK This endpoint returns no response body.

GET /connectors/configurations

List all saved broker connectors and their connection status. Passwords are not returned in the response. Response — 200 OK
[
  {
    "type": "kafka",
    "name": "local-kafka",
    "endpoint": "localhost:9092",
    "producerConnected": true,
    "consumerConnected": true,
    "authenticated": false
  },
  {
    "type": "rabbit",
    "name": "local-rabbit",
    "endpoint": "localhost:5672",
    "producerConnected": true,
    "consumerConnected": false,
    "authenticated": true
  }
]
type
string
The broker type: kafka or rabbit.
name
string
The connector name.
endpoint
string
The connection endpoint. For Kafka, the bootstrap server address. For RabbitMQ, host:port.
producerConnected
boolean
true if the producer side of the connection is active.
consumerConnected
boolean
true if the consumer side of the connection is active.
authenticated
boolean
true if credentials were provided for this connector.

DELETE /connectors/configurations//

Delete a broker connector by type and name. Path parameters
type
string
required
The broker type: kafka or rabbit.
name
string
required
The name of the connector to delete.
Request example
DELETE /connectors/configurations/kafka/local-kafka
Response — 200 OK This endpoint returns no response body.
Deleting a connector that is referenced by saved workflows will cause those workflows to fail on the next execution. Update your workflows to use a different connector before deleting.

POST /db/connectors/configurations

Create a database connector. Currently, Devset supports MongoDB.
type
string
required
The database type. Currently only "mongodb" is supported.
name
string
required
A unique name for this connector, such as local-mongo or staging-mongo.
connectionString
string
required
A valid MongoDB connection URI, such as mongodb://localhost:27017 or mongodb+srv://user:pass@cluster.example.net.
database
string
required
The default database to use when a query does not specify one explicitly.
username
string
Optional authentication username.
password
string
Optional authentication password.
Request example
{
  "type": "mongodb",
  "name": "local-mongo",
  "connectionString": "mongodb://localhost:27017",
  "database": "mydb"
}
Response — 200 OK This endpoint returns no response body.

GET /db/connectors/configurations

List all saved database connectors and their connection status. Connection string credentials are not returned in the response. Response — 200 OK
[
  {
    "type": "mongodb",
    "name": "local-mongo",
    "connectionString": "mongodb://localhost:27017",
    "connected": true,
    "authenticated": false
  }
]
type
string
The database type. Currently always "mongodb".
name
string
The connector name.
connectionString
string
The connection URI used by this connector.
connected
boolean
true if the client is currently connected to the database.
authenticated
boolean
true if credentials were provided for this connector.

DELETE /db/connectors/configurations//

Delete a database connector by type and name. Path parameters
type
string
required
The database type: mongodb.
name
string
required
The name of the connector to delete.
Request example
DELETE /db/connectors/configurations/mongodb/local-mongo
Response — 200 OK This endpoint returns no response body.

POST /mongodb/query

Run a MongoDB find query against a collection. Devset connects using the named connector and returns matching documents along with the total count.
connectionName
string
required
The name of the MongoDB connector to use.
database
string
required
The database containing the target collection.
collection
string
required
The collection to query.
filter
string
required
A MongoDB query filter document serialized as a JSON string. Use "{}" to return all documents.
projection
string
A MongoDB projection document serialized as a JSON string, specifying which fields to include (1) or exclude (0). Omit to return all fields.
limit
integer
Maximum number of documents to return. Use 0 or omit for no limit.
Request example
{
  "connectionName": "local-mongo",
  "database": "mydb",
  "collection": "orders",
  "filter": "{\"status\": \"PENDING\"}",
  "projection": "{\"id\": 1, \"amount\": 1}",
  "limit": 100
}
Response — 200 OK
{
  "documents": [
    { "id": "order-123", "amount": 42 },
    { "id": "order-124", "amount": 75 }
  ],
  "count": 2
}
documents
array
Array of matching documents, shaped by your projection. The _id field is included by default unless explicitly excluded.
count
integer
Total number of documents returned.

POST /mongodb/schema

Discover the field structure of a collection by sampling one document. Devset inspects the document and returns a list of fields with their paths, inferred BSON types, and any nested children for embedded documents. Use this to understand collection shape before writing a query or workflow stage.
connectionName
string
required
The name of the MongoDB connector to use.
database
string
required
The database containing the target collection.
collection
string
required
The collection to sample.
Request example
{
  "connectionName": "local-mongo",
  "database": "mydb",
  "collection": "orders"
}
Response — 200 OK
[
  { "path": "_id", "type": "ObjectId", "children": [] },
  { "path": "id", "type": "String", "children": [] },
  { "path": "amount", "type": "Integer", "children": [] },
  { "path": "status", "type": "String", "children": [] },
  {
    "path": "address",
    "type": "Document",
    "children": [
      { "path": "address.city", "type": "String", "children": [] },
      { "path": "address.zip", "type": "String", "children": [] }
    ]
  }
]
The response is a JSON array of field descriptors.
path
string
Dot-notation path of the field (e.g. address.city).
type
string
Inferred BSON type name (e.g. String, Integer, Document, Array).
children
array
Nested field descriptors when type is Document. Empty for all other types.
Schema discovery samples a single document. If your collection has documents with varying shapes, the result may not reflect all possible fields. Run queries against several documents to build a complete picture.

GET /mongodb//databases

List all databases accessible with the given MongoDB connector. Path parameters
connectionName
string
required
The name of the MongoDB connector to query.
Request example
GET /mongodb/local-mongo/databases
Response — 200 OK
["mydb", "analytics", "admin", "local"]
The response is a JSON array of database name strings.

GET /mongodb///collections

List all collections in a specific database. Path parameters
connectionName
string
required
The name of the MongoDB connector to query.
database
string
required
The database whose collections you want to list.
Request example
GET /mongodb/local-mongo/mydb/collections
Response — 200 OK
["orders", "payments", "users", "notifications"]
The response is a JSON array of collection name strings.