Create a connection
curl --request POST \
--url https://api-dev.narrative.io/v2/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "connections_dataset",
"dataset_id": 42,
"profile_id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"quick_settings": {
"bucket_suffix": "/my-subscription",
"number_of_files": "5"
}
}
'import requests
url = "https://api-dev.narrative.io/v2/connections"
payload = {
"type": "connections_dataset",
"dataset_id": 42,
"profile_id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"quick_settings": {
"bucket_suffix": "/my-subscription",
"number_of_files": "5"
}
}
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({
type: 'connections_dataset',
dataset_id: 42,
profile_id: 'd555f07f-f140-40d2-91af-e6aa54f7488b',
quick_settings: {bucket_suffix: '/my-subscription', number_of_files: '5'}
})
};
fetch('https://api-dev.narrative.io/v2/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://api-dev.narrative.io/v2/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([
'type' => 'connections_dataset',
'dataset_id' => 42,
'profile_id' => 'd555f07f-f140-40d2-91af-e6aa54f7488b',
'quick_settings' => [
'bucket_suffix' => '/my-subscription',
'number_of_files' => '5'
]
]),
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://api-dev.narrative.io/v2/connections"
payload := strings.NewReader("{\n \"type\": \"connections_dataset\",\n \"dataset_id\": 42,\n \"profile_id\": \"d555f07f-f140-40d2-91af-e6aa54f7488b\",\n \"quick_settings\": {\n \"bucket_suffix\": \"/my-subscription\",\n \"number_of_files\": \"5\"\n }\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://api-dev.narrative.io/v2/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"connections_dataset\",\n \"dataset_id\": 42,\n \"profile_id\": \"d555f07f-f140-40d2-91af-e6aa54f7488b\",\n \"quick_settings\": {\n \"bucket_suffix\": \"/my-subscription\",\n \"number_of_files\": \"5\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/v2/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 \"type\": \"connections_dataset\",\n \"dataset_id\": 42,\n \"profile_id\": \"d555f07f-f140-40d2-91af-e6aa54f7488b\",\n \"quick_settings\": {\n \"bucket_suffix\": \"/my-subscription\",\n \"number_of_files\": \"5\"\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "connections_dataset",
"id": "21691f26-f308-4e98-896c-579db27da04b",
"app": {
"id": 500,
"name": "S3 Connector"
},
"created_at": "2026-07-14T00:00:00Z",
"dataset_id": 42,
"installation_id": 9000,
"quick_settings": {
"bucket_suffix": "/my-subscription",
"number_of_files": "5"
},
"profile_id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"profile": {
"id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"name": "Production"
},
"status": "active"
}Connections
Create a connection
Creates a connection routing a dataset’s or model’s data to a connector app. The connector is selected by the profile: the profile belongs to an installation, and the installation identifies the app. For dataset connections the connector validates the dataset’s schema against its interfaces at create time and rejects incompatible datasets.
POST
/
v2
/
connections
Create a connection
curl --request POST \
--url https://api-dev.narrative.io/v2/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "connections_dataset",
"dataset_id": 42,
"profile_id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"quick_settings": {
"bucket_suffix": "/my-subscription",
"number_of_files": "5"
}
}
'import requests
url = "https://api-dev.narrative.io/v2/connections"
payload = {
"type": "connections_dataset",
"dataset_id": 42,
"profile_id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"quick_settings": {
"bucket_suffix": "/my-subscription",
"number_of_files": "5"
}
}
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({
type: 'connections_dataset',
dataset_id: 42,
profile_id: 'd555f07f-f140-40d2-91af-e6aa54f7488b',
quick_settings: {bucket_suffix: '/my-subscription', number_of_files: '5'}
})
};
fetch('https://api-dev.narrative.io/v2/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://api-dev.narrative.io/v2/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([
'type' => 'connections_dataset',
'dataset_id' => 42,
'profile_id' => 'd555f07f-f140-40d2-91af-e6aa54f7488b',
'quick_settings' => [
'bucket_suffix' => '/my-subscription',
'number_of_files' => '5'
]
]),
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://api-dev.narrative.io/v2/connections"
payload := strings.NewReader("{\n \"type\": \"connections_dataset\",\n \"dataset_id\": 42,\n \"profile_id\": \"d555f07f-f140-40d2-91af-e6aa54f7488b\",\n \"quick_settings\": {\n \"bucket_suffix\": \"/my-subscription\",\n \"number_of_files\": \"5\"\n }\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://api-dev.narrative.io/v2/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"connections_dataset\",\n \"dataset_id\": 42,\n \"profile_id\": \"d555f07f-f140-40d2-91af-e6aa54f7488b\",\n \"quick_settings\": {\n \"bucket_suffix\": \"/my-subscription\",\n \"number_of_files\": \"5\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/v2/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 \"type\": \"connections_dataset\",\n \"dataset_id\": 42,\n \"profile_id\": \"d555f07f-f140-40d2-91af-e6aa54f7488b\",\n \"quick_settings\": {\n \"bucket_suffix\": \"/my-subscription\",\n \"number_of_files\": \"5\"\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "connections_dataset",
"id": "21691f26-f308-4e98-896c-579db27da04b",
"app": {
"id": 500,
"name": "S3 Connector"
},
"created_at": "2026-07-14T00:00:00Z",
"dataset_id": 42,
"installation_id": 9000,
"quick_settings": {
"bucket_suffix": "/my-subscription",
"number_of_files": "5"
},
"profile_id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"profile": {
"id": "d555f07f-f140-40d2-91af-e6aa54f7488b",
"name": "Production"
},
"status": "active"
}Authorizations
BearerAuthApp_Token
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
- Option 1
- Option 2
Discriminator. Must be connections_dataset.
Available options:
connections_dataset The dataset whose data is routed to the connector.
Optional connector-specific settings, validated by the connector.
Response
201 - application/json
Created
- Option 1
- Option 2
Available options:
connections_dataset Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
active, archived Was this page helpful?
⌘I

