List share links
curl --request GET \
--url https://api.datalyr.com/v1/share-links \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalyr.com/v1/share-links"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalyr.com/v1/share-links', 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.datalyr.com/v1/share-links",
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.datalyr.com/v1/share-links"
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.datalyr.com/v1/share-links")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalyr.com/v1/share-links")
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{
"share_links": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object_type": "report",
"object_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"show_workspace_name": true,
"view_count": 1,
"created_via": "dashboard",
"created_at": "2023-11-07T05:31:56Z",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object_name": "<string>",
"token_hint": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"last_viewed_at": "2023-11-07T05:31:56Z",
"created_by": {
"type": "user",
"id": "<string>",
"client_id": "<string>"
},
"url": "<string>"
}
],
"total": 123
}{
"error": "<string>",
"code": "insufficient_scope",
"required_scope": "<string>"
}{
"error": "<string>"
}Dashboards, analyses and share links
List share links
Share links in the workspace, newest first, with the name of what each one shares. Needs datalyr:read. Only active links are listed unless include_inactive=true. No response carries the token or the URL; token_hint is its last 4 characters.
GET
/
share-links
List share links
curl --request GET \
--url https://api.datalyr.com/v1/share-links \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalyr.com/v1/share-links"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalyr.com/v1/share-links', 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.datalyr.com/v1/share-links",
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.datalyr.com/v1/share-links"
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.datalyr.com/v1/share-links")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalyr.com/v1/share-links")
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{
"share_links": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object_type": "report",
"object_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"show_workspace_name": true,
"view_count": 1,
"created_via": "dashboard",
"created_at": "2023-11-07T05:31:56Z",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object_name": "<string>",
"token_hint": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"last_viewed_at": "2023-11-07T05:31:56Z",
"created_by": {
"type": "user",
"id": "<string>",
"client_id": "<string>"
},
"url": "<string>"
}
],
"total": 123
}{
"error": "<string>",
"code": "insufficient_scope",
"required_scope": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Available options:
report, dashboard, analysis Also list expired and revoked links.
Required range:
1 <= x <= 200Was this page helpful?