Zum Inhalt springen
GET /v1/departments

Collection departments

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/museum-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/museum-api/v1/departments" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/museum-api/v1/departments", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/museum-api/v1/departments");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/museum-api/v1/departments",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "count": 19,
        "departments": [
            {
                "id": 1,
                "name": "American Decorative Arts"
            },
            {
                "id": 3,
                "name": "Ancient West Asian Art"
            },
            {
                "id": 4,
                "name": "Arms and Armor"
            },
            {
                "id": 5,
                "name": "Arts of Africa, Oceania, and the Americas"
            },
            {
                "id": 6,
                "name": "Asian Art"
            },
            {
                "id": 7,
                "name": "The Cloisters"
            },
            {
                "id": 8,
                "name": "The Costume Institute"
            },
            {
                "id": 9,
                "name": "Drawings and Prints"
            },
            {
                "id": 10,
                "name": "Egyptian Art"
            },
            {
                "id": 11,
                "name": "European Paintings"
            },
            {
                "id": 12,
                "name": "European Sculpture and Decorative Arts"
            },
            {
                "id": 13,
                "name": "Greek and Roman Art"
            },
            {
                "id": 14,
                "name": "Islamic Art"
            },
            {
                "id": 15,
                "name": "The Robert Lehman Collection"
            },
            {
                "id": 16,
                "name": "The Libraries"
            },
            {
                "id": 17,
                "name": "Medieval Art"
            },
            {
                "id": 18,
                "name": "Musical Instruments"
            },
            {
                "id": 19,
                "name": "Photographs"
            },
            {
                "id": 21,
                "name": "Modern Art"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-30T04:45:10.734Z",
        "request_id": "2f41dc94-e1cb-4a5d-900b-13be26e30ddf"
    },
    "status": "ok",
    "message": "Departments retrieved",
    "success": true
}