cURL
curl --request GET \
--url https://api.dock.us/{version}/asset-share-link \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dock.us/{version}/asset-share-link"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dock.us/{version}/asset-share-link', 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.dock.us/{version}/asset-share-link",
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.dock.us/{version}/asset-share-link"
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.dock.us/{version}/asset-share-link")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dock.us/{version}/asset-share-link")
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{
"data": {
"assetShareLink": {
"id": "RiHO4e0Ju3DS",
"object": "asset-share-link",
"url": "https://api.dock.us/v1/asset-share-link/RiHO4e0Ju3DS",
"assetId": "RiHO4e0Ju3DS",
"userId": "8dK2mLp0QweR",
"trackableUrl": "https://acme.dock.app/asset/logo-RiHO4e0Ju3DS",
"nonTrackableUrl": "https://acme.dock.app/asset/logo-9fJ1nQ2xZ0aB"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request could not be understood or was missing required parameters"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Access denied. You are not authorized to access this resource"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Access to this resource is restricted"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource could not be found"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "The server has encountered a situation it does not know how to handle"
}
}Asset share links
Retrieve asset share links
Retrieve the trackable and non-trackable share links for an asset, attributed to a user. Creates the links if they do not exist yet.
GET
/
asset-share-link
cURL
curl --request GET \
--url https://api.dock.us/{version}/asset-share-link \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dock.us/{version}/asset-share-link"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dock.us/{version}/asset-share-link', 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.dock.us/{version}/asset-share-link",
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.dock.us/{version}/asset-share-link"
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.dock.us/{version}/asset-share-link")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dock.us/{version}/asset-share-link")
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{
"data": {
"assetShareLink": {
"id": "RiHO4e0Ju3DS",
"object": "asset-share-link",
"url": "https://api.dock.us/v1/asset-share-link/RiHO4e0Ju3DS",
"assetId": "RiHO4e0Ju3DS",
"userId": "8dK2mLp0QweR",
"trackableUrl": "https://acme.dock.app/asset/logo-RiHO4e0Ju3DS",
"nonTrackableUrl": "https://acme.dock.app/asset/logo-9fJ1nQ2xZ0aB"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request could not be understood or was missing required parameters"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Access denied. You are not authorized to access this resource"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Access to this resource is restricted"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource could not be found"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "The server has encountered a situation it does not know how to handle"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Identify the asset and user. assetId is required, along with either userId or userEmail.
Show child attributes
Show child attributes
Select the asset share link properties that should be returned
Available options:
assetId, userId, trackableUrl, nonTrackableUrl Response
Asset share link
Show child attributes
Show child attributes
⌘I