curl --request POST \
--url https://api.domo.com/v1/stories/embed/auth \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionLength": 1440,
"authorizations": [
{
"token": "bc36f",
"permissions": [
"READ",
"FILTER",
"EXPORT"
],
"filters": [
{
"column": "State",
"operator": "IN",
"values": [
"California",
"New York",
"Ohio"
]
}
]
}
]
}
'import requests
url = "https://api.domo.com/v1/stories/embed/auth"
payload = {
"sessionLength": 1440,
"authorizations": [
{
"token": "bc36f",
"permissions": ["READ", "FILTER", "EXPORT"],
"filters": [
{
"column": "State",
"operator": "IN",
"values": ["California", "New York", "Ohio"]
}
]
}
]
}
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({
sessionLength: 1440,
authorizations: [
{
token: 'bc36f',
permissions: ['READ', 'FILTER', 'EXPORT'],
filters: [{column: 'State', operator: 'IN', values: ['California', 'New York', 'Ohio']}]
}
]
})
};
fetch('https://api.domo.com/v1/stories/embed/auth', 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.domo.com/v1/stories/embed/auth",
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([
'sessionLength' => 1440,
'authorizations' => [
[
'token' => 'bc36f',
'permissions' => [
'READ',
'FILTER',
'EXPORT'
],
'filters' => [
[
'column' => 'State',
'operator' => 'IN',
'values' => [
'California',
'New York',
'Ohio'
]
]
]
]
]
]),
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.domo.com/v1/stories/embed/auth"
payload := strings.NewReader("{\n \"sessionLength\": 1440,\n \"authorizations\": [\n {\n \"token\": \"bc36f\",\n \"permissions\": [\n \"READ\",\n \"FILTER\",\n \"EXPORT\"\n ],\n \"filters\": [\n {\n \"column\": \"State\",\n \"operator\": \"IN\",\n \"values\": [\n \"California\",\n \"New York\",\n \"Ohio\"\n ]\n }\n ]\n }\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.domo.com/v1/stories/embed/auth")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sessionLength\": 1440,\n \"authorizations\": [\n {\n \"token\": \"bc36f\",\n \"permissions\": [\n \"READ\",\n \"FILTER\",\n \"EXPORT\"\n ],\n \"filters\": [\n {\n \"column\": \"State\",\n \"operator\": \"IN\",\n \"values\": [\n \"California\",\n \"New York\",\n \"Ohio\"\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.domo.com/v1/stories/embed/auth")
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 \"sessionLength\": 1440,\n \"authorizations\": [\n {\n \"token\": \"bc36f\",\n \"permissions\": [\n \"READ\",\n \"FILTER\",\n \"EXPORT\"\n ],\n \"filters\": [\n {\n \"column\": \"State\",\n \"operator\": \"IN\",\n \"values\": [\n \"California\",\n \"New York\",\n \"Ohio\"\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"authentication": "thisisafakeauthenticationhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0MDAxOTY1NCIsIm5iZiI6MTU3OTY0NjE2NCwiaXNzIjoiYXB2F0ZXdheSIsImVtYiI6WyJ7XCJ0b2tlblwiOlwiYnFvN2VcIixcImxpbmtUeXBlXCI6XCJTRUFSQ0hBQkxFXCIsXCJwZXJtaXNzaW9uc1wiOltcIlJFQURcIl19Il0sII6MTU3OTY3NDk3NCwiaWF0Ir5h3joxNTc5NjQ2MTc0LCJqdGkiOiI3MTBwODRmMy094n2S3FmLTRjZWUtYTczZC00ZmNjMWU4OTViZmQifQ.ET0s7o49vLvj2MUwOALfayR7_vzEIMn5TRoTjq3TPo"
}Create an embed token (Dashboard)
curl --request POST \
--url https://api.domo.com/v1/stories/embed/auth \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionLength": 1440,
"authorizations": [
{
"token": "bc36f",
"permissions": [
"READ",
"FILTER",
"EXPORT"
],
"filters": [
{
"column": "State",
"operator": "IN",
"values": [
"California",
"New York",
"Ohio"
]
}
]
}
]
}
'import requests
url = "https://api.domo.com/v1/stories/embed/auth"
payload = {
"sessionLength": 1440,
"authorizations": [
{
"token": "bc36f",
"permissions": ["READ", "FILTER", "EXPORT"],
"filters": [
{
"column": "State",
"operator": "IN",
"values": ["California", "New York", "Ohio"]
}
]
}
]
}
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({
sessionLength: 1440,
authorizations: [
{
token: 'bc36f',
permissions: ['READ', 'FILTER', 'EXPORT'],
filters: [{column: 'State', operator: 'IN', values: ['California', 'New York', 'Ohio']}]
}
]
})
};
fetch('https://api.domo.com/v1/stories/embed/auth', 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.domo.com/v1/stories/embed/auth",
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([
'sessionLength' => 1440,
'authorizations' => [
[
'token' => 'bc36f',
'permissions' => [
'READ',
'FILTER',
'EXPORT'
],
'filters' => [
[
'column' => 'State',
'operator' => 'IN',
'values' => [
'California',
'New York',
'Ohio'
]
]
]
]
]
]),
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.domo.com/v1/stories/embed/auth"
payload := strings.NewReader("{\n \"sessionLength\": 1440,\n \"authorizations\": [\n {\n \"token\": \"bc36f\",\n \"permissions\": [\n \"READ\",\n \"FILTER\",\n \"EXPORT\"\n ],\n \"filters\": [\n {\n \"column\": \"State\",\n \"operator\": \"IN\",\n \"values\": [\n \"California\",\n \"New York\",\n \"Ohio\"\n ]\n }\n ]\n }\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.domo.com/v1/stories/embed/auth")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sessionLength\": 1440,\n \"authorizations\": [\n {\n \"token\": \"bc36f\",\n \"permissions\": [\n \"READ\",\n \"FILTER\",\n \"EXPORT\"\n ],\n \"filters\": [\n {\n \"column\": \"State\",\n \"operator\": \"IN\",\n \"values\": [\n \"California\",\n \"New York\",\n \"Ohio\"\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.domo.com/v1/stories/embed/auth")
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 \"sessionLength\": 1440,\n \"authorizations\": [\n {\n \"token\": \"bc36f\",\n \"permissions\": [\n \"READ\",\n \"FILTER\",\n \"EXPORT\"\n ],\n \"filters\": [\n {\n \"column\": \"State\",\n \"operator\": \"IN\",\n \"values\": [\n \"California\",\n \"New York\",\n \"Ohio\"\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"authentication": "thisisafakeauthenticationhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0MDAxOTY1NCIsIm5iZiI6MTU3OTY0NjE2NCwiaXNzIjoiYXB2F0ZXdheSIsImVtYiI6WyJ7XCJ0b2tlblwiOlwiYnFvN2VcIixcImxpbmtUeXBlXCI6XCJTRUFSQ0hBQkxFXCIsXCJwZXJtaXNzaW9uc1wiOltcIlJFQURcIl19Il0sII6MTU3OTY3NDk3NCwiaWF0Ir5h3joxNTc5NjQ2MTc0LCJqdGkiOiI3MTBwODRmMy094n2S3FmLTRjZWUtYTczZC00ZmNjMWU4OTViZmQifQ.ET0s7o49vLvj2MUwOALfayR7_vzEIMn5TRoTjq3TPo"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Sample Filter Objects
Filter by column "Count" for values that are greater than the value 5.
[{"column": "Count", "operator": "GREATER_THAN", "values": ["4"]}]
Filter by column "Date" for values between the following dates: "2020-01-15" and "2020-01-21".
[{"column":"Date","operand":"BETWEEN","values":["2020-01-15","2020-01-21"]}]
Filter by column "State" for values that are one of the following: "California", "New York", or "Ohio".
[{"column":"State","operand":"IN","values":["California", "New York", "Ohio"]}]
A list of embed authorization objects
Show child attributes
Show child attributes
The amount of minutes the session will be valid for. If a value is not specified here and a customer has specified a customer session idle length, then that number will be used instead. If a customer has not specified a session idle length, then a default value of 8 hours is used. The value specified here in the api cannot be greater than the customer sessions idle length if one has been set or if one hasn't been set, the value cannot be greater than the default value of 8 hours.
Response
Returns a DataSet object when successful. The returned object will have DataSet attributes based on the information that was provided when DataSet was created from the Stream created.