Fetch many data-shops
curl --request POST \
--url https://api-dev.narrative.io/data-shop/ids \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"cddfface-beda-4f84-ab22-a9933fad3992",
"6460aa19-ddb2-424c-a54e-0f80b82b1698"
]
}
'import requests
url = "https://api-dev.narrative.io/data-shop/ids"
payload = { "ids": ["cddfface-beda-4f84-ab22-a9933fad3992", "6460aa19-ddb2-424c-a54e-0f80b82b1698"] }
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({
ids: ['cddfface-beda-4f84-ab22-a9933fad3992', '6460aa19-ddb2-424c-a54e-0f80b82b1698']
})
};
fetch('https://api-dev.narrative.io/data-shop/ids', 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/data-shop/ids",
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([
'ids' => [
'cddfface-beda-4f84-ab22-a9933fad3992',
'6460aa19-ddb2-424c-a54e-0f80b82b1698'
]
]),
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/data-shop/ids"
payload := strings.NewReader("{\n \"ids\": [\n \"cddfface-beda-4f84-ab22-a9933fad3992\",\n \"6460aa19-ddb2-424c-a54e-0f80b82b1698\"\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/data-shop/ids")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"cddfface-beda-4f84-ab22-a9933fad3992\",\n \"6460aa19-ddb2-424c-a54e-0f80b82b1698\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-shop/ids")
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 \"ids\": [\n \"cddfface-beda-4f84-ab22-a9933fad3992\",\n \"6460aa19-ddb2-424c-a54e-0f80b82b1698\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostname": "<string>",
"company_id": 345,
"created_by": 123,
"created_at": "2021-06-24T00:54:40.029056Z",
"updated_by": 123,
"updated_at": "2021-06-24T00:54:40.029056Z",
"manifest": {}
}{
"error": "<string>",
"error_description": "<string>"
}Data Shops
Fetch many data-shops
Fetch many data-shops, given their ids.
Allows only upto 200 data-shops to be fetched in a call. If no ids are requested, empty array result is returned.
POST
/
data-shop
/
ids
Fetch many data-shops
curl --request POST \
--url https://api-dev.narrative.io/data-shop/ids \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"cddfface-beda-4f84-ab22-a9933fad3992",
"6460aa19-ddb2-424c-a54e-0f80b82b1698"
]
}
'import requests
url = "https://api-dev.narrative.io/data-shop/ids"
payload = { "ids": ["cddfface-beda-4f84-ab22-a9933fad3992", "6460aa19-ddb2-424c-a54e-0f80b82b1698"] }
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({
ids: ['cddfface-beda-4f84-ab22-a9933fad3992', '6460aa19-ddb2-424c-a54e-0f80b82b1698']
})
};
fetch('https://api-dev.narrative.io/data-shop/ids', 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/data-shop/ids",
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([
'ids' => [
'cddfface-beda-4f84-ab22-a9933fad3992',
'6460aa19-ddb2-424c-a54e-0f80b82b1698'
]
]),
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/data-shop/ids"
payload := strings.NewReader("{\n \"ids\": [\n \"cddfface-beda-4f84-ab22-a9933fad3992\",\n \"6460aa19-ddb2-424c-a54e-0f80b82b1698\"\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/data-shop/ids")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"cddfface-beda-4f84-ab22-a9933fad3992\",\n \"6460aa19-ddb2-424c-a54e-0f80b82b1698\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-shop/ids")
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 \"ids\": [\n \"cddfface-beda-4f84-ab22-a9933fad3992\",\n \"6460aa19-ddb2-424c-a54e-0f80b82b1698\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostname": "<string>",
"company_id": 345,
"created_by": 123,
"created_at": "2021-06-24T00:54:40.029056Z",
"updated_by": 123,
"updated_at": "2021-06-24T00:54:40.029056Z",
"manifest": {}
}{
"error": "<string>",
"error_description": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
OK
A shops hostname.
Minimum string length:
1The id of an existing company
Example:
345
ISO-8601 instant.
Example:
"2021-06-24T00:54:40.029056Z"
ISO-8601 instant.
Example:
"2021-06-24T00:54:40.029056Z"
A valid json object. This is partially governed by the passed fe_manifest.
Was this page helpful?
⌘I

