List sources
curl --request GET \
--url https://control.api.niadra.com/v1/sources \
--header 'Authorization: Bearer <token>'import requests
url = "https://control.api.niadra.com/v1/sources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://control.api.niadra.com/v1/sources', 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://control.api.niadra.com/v1/sources",
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://control.api.niadra.com/v1/sources"
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://control.api.niadra.com/v1/sources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/sources")
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[
{
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c45",
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": [
"billing"
],
"verification_ceiling": "no_customer",
"confirms_before_acting": false,
"navigation_enabled": true,
"trusted_action_ops": [
"credit"
],
"critical": false,
"revoked_at": null
}
]{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Control: sources and keys
List sources
The agents, vendors and systems that talk to a space.
GET
/
v1
/
sources
List sources
curl --request GET \
--url https://control.api.niadra.com/v1/sources \
--header 'Authorization: Bearer <token>'import requests
url = "https://control.api.niadra.com/v1/sources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://control.api.niadra.com/v1/sources', 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://control.api.niadra.com/v1/sources",
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://control.api.niadra.com/v1/sources"
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://control.api.niadra.com/v1/sources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/sources")
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[
{
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c45",
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": [
"billing"
],
"verification_ceiling": "no_customer",
"confirms_before_acting": false,
"navigation_enabled": true,
"trusted_action_ops": [
"credit"
],
"critical": false,
"revoked_at": null
}
]{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The space whose sources you want.
Response
The sources of the space. A person with the vendor role sees only their own.
Available options:
customer_agent, internal_agent, human, reviewer, analyst, trigger_target, export Session verification levels. no_customer sits outside the V0-V4 scale.
Available options:
V0, V1, V2, V3, V4, no_customer 
