curl --request GET \
--url https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}', 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/apps/{app_id}/interfaces/{interface_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "audience_export",
"name": "Audience Export",
"app_id": 42,
"metadata": {
"tags": [
"advertising",
"audience_delivery"
],
"refresh_schedule": {
"max": "P180D"
}
},
"schema": {
"type": "object",
"properties": {
"audience_name": {
"title": "Audience Name",
"type": "string"
}
},
"required": [
"audience_name"
]
},
"policy": {
"type": "object",
"description": "JSON Schema metaschema over dataset schemas"
}
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Get an app interface
Returns one of a connector app’s interfaces by id. The app must be installed by the caller’s company. The interface is fetched live from the connector’s server.
curl --request GET \
--url https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}', 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/apps/{app_id}/interfaces/{interface_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/apps/{app_id}/interfaces/{interface_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "audience_export",
"name": "Audience Export",
"app_id": 42,
"metadata": {
"tags": [
"advertising",
"audience_delivery"
],
"refresh_schedule": {
"max": "P180D"
}
},
"schema": {
"type": "object",
"properties": {
"audience_name": {
"title": "Audience Name",
"type": "string"
}
},
"required": [
"audience_name"
]
},
"policy": {
"type": "object",
"description": "JSON Schema metaschema over dataset schemas"
}
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
the app id
Identifier of the interface, as returned by the interface listing endpoints.
Response
OK
Identifier of the interface, unique within the app. The same identifiers are returned by GET /datasets/{dataset_id}/interfaces, so results from the two endpoints can be joined.
Human-readable name of the interface.
ID of the installed app that owns this interface.
Interface metadata.
Show child attributes
Show child attributes
JSON Schema for the interface's quick settings, used as the quick_settings object when configuring a connection to this interface. May embed a uischema key describing how the platform UI renders the settings form.
The interface's collaboration policy, a JSON Schema metaschema that dataset schemas are validated against (as by GET /datasets/{dataset_id}/interfaces). Note this document can be large. Absent when the interface accepts any dataset schema.
Was this page helpful?

