# Workspaces auflisten

Workspaces der Organisation auflisten

`GET https://tokenlane.de/api/workspaces`

## 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
curl --request GET \
  --url 'https://tokenlane.de/api/workspaces' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

## node

```node
const response = await fetch("https://tokenlane.de/api/workspaces", {
  method: "GET",
  headers: {
    "Authorization": "Bearer " + process.env.TOKENLANE_API_KEY,
  },
});
console.log(await response.text());
```

## python

```python
import os
import urllib.request

request = urllib.request.Request(
    "https://tokenlane.de/api/workspaces",
    method="GET",
    headers={
        "Authorization": "Bearer " + os.environ["TOKENLANE_API_KEY"],
    },
)

with urllib.request.urlopen(request) as response:
    print(response.read().decode("utf-8"))
```

## vercel

```vercel
// This operation uses HTTP directly.
const response = await fetch("https://tokenlane.de/api/workspaces", {
  method: "GET",
  headers: {
    "Authorization": "Bearer " + process.env.TOKENLANE_API_KEY,
  },
});
console.log(await response.text());
```

## Antwort 200: application/json

Anfrage erfolgreich

```json
[
  {
    "id": "wsp_01k7tm3w8vfz6b2r4m9q5xyz7c",
    "name": "Default",
    "isDefault": false,
    "createdAt": "YOUR_CREATEDAT"
  }
]
```

### s37: array

{}

### s39: object

{}

- id (Pflichtfeld): s100

### s100: string

{}

```json
"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

{}

```json
"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 401: application/json

Authentifizierung erforderlich: Zugangsdaten fehlen oder sind ungültig.

```json
{
  "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

{}

```json
400
```

- code (Pflichtfeld): s58

### s58: string

Fehlercode

{}

```json
"VALIDATION_ERROR"
```

- message (Pflichtfeld): s59

### s59: string

Fehlermeldung

{}

```json
"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

{}

```json
"title"
```

- message (Pflichtfeld): s180

### s180: string

Fehlermeldung zum Feld

{}

```json
"Required"
```

## Antwort 403: application/json

Berechtigungsumfang reicht nicht aus: authentifiziert, aber nicht berechtigt.

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Antwort 409: application/json

Aktuell veröffentlichte Bedingungen vor Fortsetzen dieser Sitzung lesen und akzeptieren

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Antwort 500: application/json

Interner Serverfehler

```json
{
  "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.

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```
