Workspace abrufen
Workspace der Organisation abrufen
GET https://tokenlane.de/api/workspaces/{id}
Authentifizierung
[ [ { "name": "Authorization", "description": "Management-Key der Organisation: Authorization: Bearer sk-tl-v1-…. Bestehende sk-eu--Keys bleiben gültig. Erforderliche Scopes stehen in x-scopes; Inferenz-Keys berechtigen nicht zu Verwaltungsoperationen.", "type": "http bearer", "location": "", "scopes": [] } ] ]
curl
curl --request GET \
--url 'https://tokenlane.de/api/workspaces/wsp_01k7tm3w8vfz6b2r4m9q5xyz7c' \
--header 'Authorization: Bearer YOUR_API_KEY'
node
const response = await fetch("https://tokenlane.de/api/workspaces/wsp_01k7tm3w8vfz6b2r4m9q5xyz7c", {
method: "GET",
headers: {
"Authorization": "Bearer " + process.env.TOKENLANE_API_KEY,
},
});
console.log(await response.text());
python
import os
import urllib.request
request = urllib.request.Request(
"https://tokenlane.de/api/workspaces/wsp_01k7tm3w8vfz6b2r4m9q5xyz7c",
method="GET",
headers={
"Authorization": "Bearer " + os.environ["TOKENLANE_API_KEY"],
},
)
with urllib.request.urlopen(request) as response:
print(response.read().decode("utf-8"))
vercel
// This operation uses HTTP directly.
const response = await fetch("https://tokenlane.de/api/workspaces/wsp_01k7tm3w8vfz6b2r4m9q5xyz7c", {
method: "GET",
headers: {
"Authorization": "Bearer " + process.env.TOKENLANE_API_KEY,
},
});
console.log(await response.text());
Pfadparameter: id (Pflichtfeld)
Workspace-Kennung
s38: string
Workspace-Kennung
{}
"wsp_01k7tm3w8vfz6b2r4m9q5xyz7c"
Antwort 200: application/json
Anfrage erfolgreich
{
"id": "wsp_01k7tm3w8vfz6b2r4m9q5xyz7c",
"name": "Default",
"isDefault": false,
"createdAt": "YOUR_CREATEDAT"
}
s39: object
{}
- id (Pflichtfeld): s100
s100: string
{}
"wsp_01k7tm3w8vfz6b2r4m9q5xyz7c"
- description (optional): s87
s87: string | null
{}
- budget (optional): s101
s101: anyOf
{}
anyOf: s45
s45: allOf
{}
allOf: s46
s46: object
{"additionalProperties":"false"}
- limit (Pflichtfeld): s146
s146: string
Nicht negativer EUR-Dezimalwert mit höchstens 12 Nachkommastellen innerhalb vorzeichenbehafteter 64-Bit-Pico-EUR.
{"maxLength":"32","pattern":"\"^\\\\d+(?:\\\\.\\\\d{1,12})?$/u\""}
- period (Pflichtfeld): s147
s147: string
"daily", "weekly", "monthly", "once"
{}
- mode (Pflichtfeld): s148
s148: string
"stop", "warn"
{}
allOf: s145
s145: object
{"additionalProperties":"false"}
- currency (Pflichtfeld): s81
s81: string
"EUR"
{}
- spentPicoEur (Pflichtfeld): s174
s174: string | null
{"pattern":"\"^\\\\d+$\""}
- reservedPicoEur (Pflichtfeld): s175
s175: string
{"pattern":"\"^\\\\d+$\""}
- resetAt (Pflichtfeld): s86
s86: string | null
date-time
{}
- threshold (Pflichtfeld): s176
s176: anyOf
{}
anyOf: s187
s187: number
0
{}
anyOf: s188
s188: number
50
{}
anyOf: s189
s189: number
80
{}
anyOf: s190
s190: number
100
{}
- stopped (Pflichtfeld): s89
s89: boolean
{}
- revision (Pflichtfeld): s35
s35: string
{}
anyOf: s162
s162: null
{}
- budgetRevision (optional): s35
- accessRole (optional): s102
s102: string
Frisch ermittelte wirksame Rolle des Aufrufers in diesem Workspace; Organisationsadmins verwalten jeden Workspace
"organization", "viewer", "developer", "admin"
{}
- name (Pflichtfeld): s103
s103: string
{}
"Default"
- isDefault (Pflichtfeld): s104
s104: boolean
Neue Keys werden hier zugeordnet, sofern kein anderer Workspace gewählt wird.
{}
- createdAt (Pflichtfeld): s105
s105: string
date-time
{}
Antwort 400: application/json
Ungültige Anfrage: Validierungsfehler oder ungültige Eingabe.
{
"status": 400,
"code": "VALIDATION_ERROR",
"message": "Request validation failed"
}
s11: object
{}
- requestId (optional): s56
s56: string
Serverseitige Zuordnungs-ID für einen internen Fehler. Auch in X-Request-Id enthalten.
uuid
{}
- status (Pflichtfeld): s57
s57: number
HTTP-Statuscode
{}
400
- code (Pflichtfeld): s58
s58: string
Fehlercode
{}
"VALIDATION_ERROR"
- message (Pflichtfeld): s59
s59: string
Fehlermeldung
{}
"Request validation failed"
- remedy_hint (optional): s60
s60: string
Sichere, ausführbare Abhilfe aus dem Fehlerkatalog.
{}
- details (optional): s61
s61: array
Detaillierte Validierungsfehler
{}
s154: object
{}
- path (Pflichtfeld): s179
s179: string
Feldpfad
{}
"title"
- message (Pflichtfeld): s180
s180: string
Fehlermeldung zum Feld
{}
"Required"
Antwort 401: application/json
Authentifizierung erforderlich: Zugangsdaten fehlen oder sind ungültig.
{
"status": 400,
"code": "VALIDATION_ERROR",
"message": "Request validation failed"
}
Antwort 403: application/json
Berechtigungsumfang reicht nicht aus: authentifiziert, aber nicht berechtigt.
{
"status": 400,
"code": "VALIDATION_ERROR",
"message": "Request validation failed"
}
Antwort 404: application/json
Ressource nicht gefunden
{
"status": 400,
"code": "VALIDATION_ERROR",
"message": "Request validation failed"
}
Antwort 409: application/json
Konflikt mit dem aktuellen Zustand, beispielsweise ein bereits vorhandener Name.
{
"status": 400,
"code": "VALIDATION_ERROR",
"message": "Request validation failed"
}
Antwort 500: application/json
Interner Serverfehler
{
"status": 400,
"code": "VALIDATION_ERROR",
"message": "Request validation failed"
}
Antwort 503: application/json
Konfigurierter Upstream hat das Zeitlimit überschritten, ist fehlgeschlagen oder hat eine ungültige Antwort geliefert.
{
"status": 400,
"code": "VALIDATION_ERROR",
"message": "Request validation failed"
}