curl --request POST \
--url https://matcher.sandbox.lerian.net/v1/discovery/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configName": "<string>",
"databaseName": "<string>",
"databaseType": "<string>",
"host": "<string>",
"port": 32768,
"userName": "<string>",
"password": "<string>",
"schema": "<string>"
}
'import requests
url = "https://matcher.sandbox.lerian.net/v1/discovery/connections"
payload = {
"configName": "<string>",
"databaseName": "<string>",
"databaseType": "<string>",
"host": "<string>",
"port": 32768,
"userName": "<string>",
"password": "<string>",
"schema": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configName: '<string>',
databaseName: '<string>',
databaseType: '<string>',
host: '<string>',
port: 32768,
userName: '<string>',
password: '<string>',
schema: '<string>'
})
};
fetch('https://matcher.sandbox.lerian.net/v1/discovery/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://matcher.sandbox.lerian.net/v1/discovery/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configName' => '<string>',
'databaseName' => '<string>',
'databaseType' => '<string>',
'host' => '<string>',
'port' => 32768,
'userName' => '<string>',
'password' => '<string>',
'schema' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://matcher.sandbox.lerian.net/v1/discovery/connections"
payload := strings.NewReader("{\n \"configName\": \"<string>\",\n \"databaseName\": \"<string>\",\n \"databaseType\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": 32768,\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"schema\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://matcher.sandbox.lerian.net/v1/discovery/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configName\": \"<string>\",\n \"databaseName\": \"<string>\",\n \"databaseType\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": 32768,\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"schema\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://matcher.sandbox.lerian.net/v1/discovery/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configName\": \"<string>\",\n \"databaseName\": \"<string>\",\n \"databaseType\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": 32768,\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"schema\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"configName": "<string>",
"databaseType": "<string>",
"status": "<string>",
"schemaDiscovered": true,
"lastSeenAt": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Create discovery connection
Provisions a Fetcher connection scoped to Matcher and synchronizes the local discovery cache.
curl --request POST \
--url https://matcher.sandbox.lerian.net/v1/discovery/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configName": "<string>",
"databaseName": "<string>",
"databaseType": "<string>",
"host": "<string>",
"port": 32768,
"userName": "<string>",
"password": "<string>",
"schema": "<string>"
}
'import requests
url = "https://matcher.sandbox.lerian.net/v1/discovery/connections"
payload = {
"configName": "<string>",
"databaseName": "<string>",
"databaseType": "<string>",
"host": "<string>",
"port": 32768,
"userName": "<string>",
"password": "<string>",
"schema": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configName: '<string>',
databaseName: '<string>',
databaseType: '<string>',
host: '<string>',
port: 32768,
userName: '<string>',
password: '<string>',
schema: '<string>'
})
};
fetch('https://matcher.sandbox.lerian.net/v1/discovery/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://matcher.sandbox.lerian.net/v1/discovery/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configName' => '<string>',
'databaseName' => '<string>',
'databaseType' => '<string>',
'host' => '<string>',
'port' => 32768,
'userName' => '<string>',
'password' => '<string>',
'schema' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://matcher.sandbox.lerian.net/v1/discovery/connections"
payload := strings.NewReader("{\n \"configName\": \"<string>\",\n \"databaseName\": \"<string>\",\n \"databaseType\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": 32768,\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"schema\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://matcher.sandbox.lerian.net/v1/discovery/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configName\": \"<string>\",\n \"databaseName\": \"<string>\",\n \"databaseType\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": 32768,\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"schema\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://matcher.sandbox.lerian.net/v1/discovery/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configName\": \"<string>\",\n \"databaseName\": \"<string>\",\n \"databaseType\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": 32768,\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"schema\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"configName": "<string>",
"databaseType": "<string>",
"status": "<string>",
"schemaDiscovered": true,
"lastSeenAt": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Authorizations
Bearer token authentication (format: "Bearer {token}")
Body
Connection configuration name
1"prod-ledger-db"
Database name
1"ledger"
Database engine type; canonical token or a common alias (e.g. postgres -> POSTGRESQL, mysql -> MYSQL)
1"POSTGRESQL"
Database host
1"db.internal.example.com"
Database TCP port (1-65535)
1 <= x <= 655355432
Database user name the connection authenticates as
1"matcher_ro"
Optional schema/namespace within the database
"public"
Response
Created
A discovered Fetcher database connection
Internal identifier for the connection
Name of the Fetcher configuration that produced this connection
Type of database (e.g. postgres, mysql)
Current connection status
Whether the table schema has been discovered for this connection
Timestamp when this connection was last observed in Fetcher
Was this page helpful?

