Read the state of initialized assets
curl --request GET \
--url https://api.occtoo.com/v1/assets/{dataSourceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.occtoo.com/v1/assets/{dataSourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.occtoo.com/v1/assets/{dataSourceId}', 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.occtoo.com/v1/assets/{dataSourceId}",
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.occtoo.com/v1/assets/{dataSourceId}"
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.occtoo.com/v1/assets/{dataSourceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/assets/{dataSourceId}")
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{
"sku-1": {
"status": "Completed",
"filename": "front.jpg",
"mimeType": "image/jpeg",
"size": 120432,
"publicUrl": "https://cdn.occtoo-media.com/6b1f0b3c-6f2e-4a52-9a1e-7c6f0c2f9a10/9c2a7d18-4f6b-4f0b-9a2a-2f2e6c7d8e90/front.jpg"
},
"sku-2": {
"status": "Initialized",
"filename": null,
"mimeType": null,
"size": null,
"publicUrl": null
}
}Assets API
Read the state of initialized assets
Reads the state of initialized assets. At most 50 entry keys per call.
An entry key with no initialized asset is absent from the response. Initialized covers the whole window between initializing and the bytes being accounted for — the PUT goes straight to storage, so nothing in between is observable here.
GET
/
v1
/
assets
/
{dataSourceId}
Read the state of initialized assets
curl --request GET \
--url https://api.occtoo.com/v1/assets/{dataSourceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.occtoo.com/v1/assets/{dataSourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.occtoo.com/v1/assets/{dataSourceId}', 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.occtoo.com/v1/assets/{dataSourceId}",
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.occtoo.com/v1/assets/{dataSourceId}"
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.occtoo.com/v1/assets/{dataSourceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/assets/{dataSourceId}")
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{
"sku-1": {
"status": "Completed",
"filename": "front.jpg",
"mimeType": "image/jpeg",
"size": 120432,
"publicUrl": "https://cdn.occtoo-media.com/6b1f0b3c-6f2e-4a52-9a1e-7c6f0c2f9a10/9c2a7d18-4f6b-4f0b-9a2a-2f2e6c7d8e90/front.jpg"
},
"sku-2": {
"status": "Initialized",
"filename": null,
"mimeType": null,
"size": null,
"publicUrl": null
}
}Authorizations
kindeOAuthbearerAuthapiKey
Path Parameters
Query Parameters
Was this page helpful?