# OTOBO API Queues, Status und dynamische Felder

> Queues, Status, Typen, Services, Prioritäten und dynamische Felder über die OTOBO API listen.

- HTML: https://otobo-docs.softoft.de/de/otobo-api/catalogue/
- Markdown: https://otobo-docs.softoft.de/de/otobo-api/catalogue.md

Die Katalog-Routen sind reine Lese-Listen. Damit füllen Sie Ticket-Anlage und Suche mit Namen, die das System wirklich hat. Jede Liste ist nach dem Benutzer des Tokens gefiltert, so wie die Agentenoberfläche Queues ausblendet, die dieser Benutzer nicht sieht.

| Liste | Aufruf |
| --- | --- |
| Queues | `GET /queues` |
| Status | `GET /states` |
| Typen | `GET /types` |
| Services | `GET /services` |
| Prioritäten | `GET /priorities` |
| Dynamische Felder | `GET /dynamic-fields` |
| Werte eines dynamischen Feldes | `GET /dynamic-fields/Department/values` |

Ein Eintrag hat `id`, `name` und `valid`. Dynamische Felder haben zusätzlich `fieldType`.

### Python

```python

response = requests.get(
    "https://helpdesk.example.com/otobo/otai-api.pl/v1/queues",
    headers={"Authorization": "Bearer YOUR_TOKEN"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

### TypeScript

```typescript
const response = await fetch("https://helpdesk.example.com/otobo/otai-api.pl/v1/queues", {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_TOKEN",
    Accept: "application/json",
  },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```

### Java

```java

HttpClient client = HttpClient.newHttpClient();
HttpRequest.BodyPublisher body = HttpRequest.BodyPublishers.noBody();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://helpdesk.example.com/otobo/otai-api.pl/v1/queues"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .header("Accept", "application/json")
    .method("GET", body)
    .build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

### PHP

```php
<?php
$ch = curl_init("https://helpdesk.example.com/otobo/otai-api.pl/v1/queues");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json",
    ],
    CURLOPT_RETURNTRANSFER => true,
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $body;
```

Ausführliche Beispiele, eine Sprache pro Seite:

- [Python](https://otobo-docs.softoft.de/de/otobo-api/python/)
- [TypeScript](https://otobo-docs.softoft.de/de/otobo-api/typescript/)
- [Java](https://otobo-docs.softoft.de/de/otobo-api/java/)
- [PHP](https://otobo-docs.softoft.de/de/otobo-api/php/)

## Häufig gestellte Fragen

### Warum fehlt eine Queue in GET /queues?

Der Benutzer des Tokens hat kein Recht auf diese Queue, oder die Queue ist ungültig.

- [OTOBO API Queues, Status und dynamische Felder](https://otobo-docs.softoft.de/de/otobo-api/catalogue/)
- [OTOBO Admin-Handbuch](https://doc.otobo.org/manual/admin/11.0/de/content/index.html)

### Wie lese ich Werte eines dynamischen Feldes?

GET /dynamic-fields/{name}/values liefert die auswählbaren Werte dieses Feldes.

- [OTOBO API Queues, Status und dynamische Felder](https://otobo-docs.softoft.de/de/otobo-api/catalogue/)
- [OTOBO Admin-Handbuch](https://doc.otobo.org/manual/admin/11.0/de/content/index.html)
