A model viewset that uses different serializers for the list and detail views.

GET /api/v2/deployments/24/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 24,
    "name": "UK - East Hendred (-)",
    "details": "https://api.beluga.insectai.org/api/v2/deployments/24/?format=api",
    "image": null,
    "events": [
        {
            "id": 791,
            "name": "Wednesday, Aug 2-3 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/791/?format=api",
            "occurrences_count": 12,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 792,
            "name": "Friday, Aug 4-5 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/792/?format=api",
            "occurrences_count": 2,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 796,
            "name": "Monday, Aug 7-8 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/796/?format=api",
            "occurrences_count": 2,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 797,
            "name": "Wednesday, Aug 9-10 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/797/?format=api",
            "occurrences_count": 2,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 799,
            "name": "Friday, Aug 11-12 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/799/?format=api",
            "occurrences_count": 1,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 786,
            "name": "Monday, Aug 14-15 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/786/?format=api",
            "occurrences_count": 0,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 801,
            "name": "Wednesday, Aug 16-17 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/801/?format=api",
            "occurrences_count": 6,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 803,
            "name": "Friday, Aug 18-19 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/803/?format=api",
            "occurrences_count": 2,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 805,
            "name": "Monday, Aug 21-22 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/805/?format=api",
            "occurrences_count": 0,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 807,
            "name": "Wednesday, Aug 23-24 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/807/?format=api",
            "occurrences_count": 5,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 808,
            "name": "Friday, Aug 25-26 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/808/?format=api",
            "occurrences_count": 0,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 811,
            "name": "Monday, Aug 28-29 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/811/?format=api",
            "occurrences_count": 1,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 812,
            "name": "Wednesday, Aug 30-31 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/812/?format=api",
            "occurrences_count": 2,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 813,
            "name": "Friday, Sep 1-2 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/813/?format=api",
            "occurrences_count": 0,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 816,
            "name": "Monday, Sep 4-5 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/816/?format=api",
            "occurrences_count": 1,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 819,
            "name": "Wednesday, Sep 6-7 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/819/?format=api",
            "occurrences_count": 0,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 821,
            "name": "Friday, Sep 8-9 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/821/?format=api",
            "occurrences_count": 3,
            "taxa_count": 0,
            "user_permissions": []
        },
        {
            "id": 823,
            "name": "Monday, Sep 11-12 2023",
            "details": "https://api.beluga.insectai.org/api/v2/events/823/?format=api",
            "occurrences_count": 1,
            "taxa_count": 0,
            "user_permissions": []
        }
    ],
    "occurrences": "https://api.beluga.insectai.org/api/v2/occurrences/?format=api?deployment=24",
    "events_count": 18,
    "captures_count": 82373,
    "occurrences_count": 41,
    "taxa_count": 33,
    "project": {
        "id": 1,
        "name": "UK Centre for Ecology & Hydrology",
        "image": "https://object-arbutus.cloud.computecanada.ca/ami-media-staging/uploads/projects/UKCEH-Logo_Long_Pos_RGB_720x170.3e431742_K95nKEL.png",
        "details": "https://api.beluga.insectai.org/api/v2/projects/1/?format=api",
        "user_permissions": []
    },
    "created_at": "2023-09-08T13:52:06.842037",
    "updated_at": "2025-10-08T21:19:53.973830",
    "latitude": 51.59681,
    "longitude": -1.33561,
    "first_date": "2023-08-02",
    "last_date": "2023-09-12",
    "device": {
        "id": 1,
        "name": "UKCEH Trap",
        "details": "https://api.beluga.insectai.org/api/v2/deployments/devices/1/?format=api",
        "user_permissions": []
    },
    "research_site": {
        "id": 1,
        "name": "Default Research Site",
        "details": "https://api.beluga.insectai.org/api/v2/deployments/sites/1/?format=api",
        "user_permissions": []
    },
    "jobs": [],
    "data_source": {
        "id": 1,
        "name": "AMI Shared Trap Data",
        "details": "https://api.beluga.insectai.org/api/v2/storage/1/?format=api",
        "user_permissions": [],
        "uri": "s3://ami-trapdata/uk/Ag0+/east_hendred/negative/"
    },
    "data_source_uri": "s3://ami-trapdata/uk/Ag0+/east_hendred/negative/",
    "data_source_total_files": 82373,
    "data_source_total_size": 197322227978,
    "data_source_total_size_display": "183.8 GB",
    "data_source_last_checked": "2023-09-20T14:28:27.694624",
    "data_source_subdir": "uk/Ag0+/east_hendred/negative",
    "data_source_regex": null,
    "description": "",
    "example_captures": [
        {
            "id": 4076959,
            "details": "https://api.beluga.insectai.org/api/v2/captures/4076959/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_09_08.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 4058135,
            "details": "https://api.beluga.insectai.org/api/v2/captures/4058135/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_09_06.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 4014893,
            "details": "https://api.beluga.insectai.org/api/v2/captures/4014893/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_08_23.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 3992562,
            "details": "https://api.beluga.insectai.org/api/v2/captures/3992562/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_08_16.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 4095884,
            "details": "https://api.beluga.insectai.org/api/v2/captures/4095884/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_09_11.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 3944869,
            "details": "https://api.beluga.insectai.org/api/v2/captures/3944869/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_08_02.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 4046313,
            "details": "https://api.beluga.insectai.org/api/v2/captures/4046313/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_09_04.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 3954242,
            "details": "https://api.beluga.insectai.org/api/v2/captures/3954242/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_08_04.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 3978066,
            "details": "https://api.beluga.insectai.org/api/v2/captures/3978066/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_08_14.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        },
        {
            "id": 3967937,
            "details": "https://api.beluga.insectai.org/api/v2/captures/3967937/?format=api",
            "url": "https://static.dev.insectai.org/ami-trapdata/uk/Ag0+/east_hendred/negative/2023_08_09.zip",
            "width": null,
            "height": null,
            "timestamp": null,
            "event": null,
            "user_permissions": []
        }
    ],
    "manually_uploaded_captures": [],
    "user_permissions": []
}