Blob-Endpunkte
Blob Object List
Diese Dokumentation bietet einen umfassenden Überblick über den GET /v1/objects-Endpoint der SquareCloud Blob API.
GET
/
v1
/
objects
Blob Object List
curl --request GET \
--url https://blob.squarecloud.app/v1/objects \
--header 'Authorization: <authorization>'import requests
url = "https://blob.squarecloud.app/v1/objects"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://blob.squarecloud.app/v1/objects', 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://blob.squarecloud.app/v1/objects",
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: <authorization>"
],
]);
$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://blob.squarecloud.app/v1/objects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://blob.squarecloud.app/v1/objects")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.squarecloud.app/v1/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"response": {
"objects": [
{
"id": "ID/name1_ltq7b2sw-de6241.jpeg",
"size": 78266,
"created_at": "2024-03-13T19:31:28.776Z"
},
{
"id": "ID/name_ltq7b2sw-de6243-ex1.jpeg",
"size": 90466,
"created_at": "2024-03-13T19:35:28.776Z",
"expires_at": "2024-03-14T19:35:28.776Z"
}
],
"continuationToken": null
}
}
Der API-Schlüssel für Ihr Konto. Sie finden ihn in Ihren Kontoeinstellungen.
Eine Zeichenkette, die den Präfix für die Datei darstellt.
Muss dem Muster a bis z, A bis Z, 0 bis 9 und _ entsprechen. (3 bis 32 Zeichen)
Muss dem Muster a bis z, A bis Z, 0 bis 9 und _ entsprechen. (3 bis 32 Zeichen)
Eine Zeichenkette, die das Continuation-Token für die Dateiliste darstellt. (1000 Objekte pro Seite)
Antwort
Gibt an, ob der Aufruf erfolgreich war. “success” bei Erfolg, “error” bei Misserfolg.
Anzeigen Objekt umschalten
Anzeigen Objekt umschalten
Token zum Abrufen der nächsten Seite; übergib es erneut als
continuationToken-Query-Parameter. null oder nicht vorhanden, wenn es keine weiteren Objekte gibt.{
"status": "success",
"response": {
"objects": [
{
"id": "ID/name1_ltq7b2sw-de6241.jpeg",
"size": 78266,
"created_at": "2024-03-13T19:31:28.776Z"
},
{
"id": "ID/name_ltq7b2sw-de6243-ex1.jpeg",
"size": 90466,
"created_at": "2024-03-13T19:35:28.776Z",
"expires_at": "2024-03-14T19:35:28.776Z"
}
],
"continuationToken": null
}
}
Fehlerbehebung
- Statuscode 400
- Statuscode 401
- Statuscode 429
Objektbezogen
// The provided object prefix is invalid.
// Must adhere to the a to z, A to Z, 0 to 9, and _ pattern.
{
"status": "error",
"code": "INVALID_OBJECT_PREFIX"
}
// The provided continuation token is invalid (must be a string up to 2048 characters).
{
"status": "error",
"code": "INVALID_CONTINUATION_TOKEN"
}
// The request to list the objects failed. Please try again.
{
"status": "error",
"code": "FAILED_LIST"
}
Nicht autorisiert
// The API key is missing or invalid. Set a valid key in the Authorization header.
{
"status": "error",
"code": "ACCESS_DENIED"
}
Rate-Limit erreicht
// List rate limit reached (10 requests per 30s window).
{
"status": "error",
"code": "RATELIMIT"
}
Zurück
Object PostDiese Dokumentation bietet einen umfassenden Überblick über den Endpoint POST /v1/objects der SquareCloud Blob API.
Weiter
⌘I
Blob Object List
curl --request GET \
--url https://blob.squarecloud.app/v1/objects \
--header 'Authorization: <authorization>'import requests
url = "https://blob.squarecloud.app/v1/objects"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://blob.squarecloud.app/v1/objects', 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://blob.squarecloud.app/v1/objects",
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: <authorization>"
],
]);
$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://blob.squarecloud.app/v1/objects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://blob.squarecloud.app/v1/objects")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.squarecloud.app/v1/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"response": {
"objects": [
{
"id": "ID/name1_ltq7b2sw-de6241.jpeg",
"size": 78266,
"created_at": "2024-03-13T19:31:28.776Z"
},
{
"id": "ID/name_ltq7b2sw-de6243-ex1.jpeg",
"size": 90466,
"created_at": "2024-03-13T19:35:28.776Z",
"expires_at": "2024-03-14T19:35:28.776Z"
}
],
"continuationToken": null
}
}

