curl --request GET \
--url https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}', 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.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}",
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.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}"
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.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}")
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{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"currentVersion": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}Get a data asset's latest metadata and a presigned download URL
curl --request GET \
--url https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}', 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.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}",
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.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}"
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.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalinks.com/api/v1/data-assets/{username}/{namespace}/{assetId}")
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{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"currentVersion": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"downloadUrl": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Use a Bearer token for authentication. Submit the token using the Authorization
header: Authorization: Bearer <token>.
Path Parameters
The username associated with the request.
Namespace for the dataset.
The data asset's id.
Query Parameters
Presigned download URL lifetime in seconds (default 900, max 3600).
Response
The latest version's metadata and download URL
Presigned GET URL, valid until expiresAt. Send no Authorization header - the
signature is the credential.
A Content-Disposition: attachment naming the asset is signed into the URL, so S3
returns it on the response and a browser saves the file under the asset's name rather
than the opaque S3 key. Because it is part of the signature it cannot be overridden by
the caller. Every version of an asset downloads under the same name, so saving two
versions to one directory will collide - rename client-side if that matters.