活动 API
会议、音乐会、工作坊等活动,有的已售罄,有的免费。内存中的固定数据:写入会保留到应用重启为止。
你的账号已解锁这些端点。在每个端点的页面上用 Try it 发送请求。
- GET
https://api.testingapis.com/api/EventsList events with filtering, sorting, search and paginationList events with filtering, sorting, search and pagination. - POST
https://api.testingapis.com/api/EventsCreate an eventCreate an event. - GETHEAD
https://api.testingapis.com/api/Events/{id}Get an event by IDGet an event by ID (HEAD returns the headers only). - PUT
https://api.testingapis.com/api/Events/{id}Replace an eventReplace an event. - PATCH
https://api.testingapis.com/api/Events/{id}Partially update an event with a JSON merge patchPartially update an event with a JSON merge patch. - DELETE
https://api.testingapis.com/api/Events/{id}Delete an eventDelete an event. - POST
https://api.testingapis.com/api/Events/bulkCreate up to 100 events in one requestCreate up to 100 events in one request. - DELETE
https://api.testingapis.com/api/Events/bulkDelete several events by IDDelete several events by ID. - GET
https://api.testingapis.com/api/Events/countCount all eventsCount all events. - GET
https://api.testingapis.com/api/Events/upcomingList events starting on or after a date, soonest firstList events starting on or after a date, soonest first.
请求示例
List events with filtering, sorting, search and pagination. 完整参考和 Send 按钮(英文).
cURL
curl -X GET "https://api.testingapis.com/api/Events?limit=2"响应 · 200 OK
[
{
"id": 1,
"name": "DevConf 2026",
"category": "conference",
"venue": "Moscone Center",
"city": "San Francisco",
"startsAt": "2026-10-14T09:00:00Z",
"endsAt": "2026-10-16T18:00:00Z",
"price": 499.0,
"capacity": 5000,
"ticketsSold": 4312,
… (3 more lines)筛选、排序与分页
列表端点接受 limit、page、offset、sort、order 和 q,任何字段名都可用作精确筛选。总数通过 X-Total-Count 响应头返回。写入的数据在服务器重启前都保存在内存中,所以测试可以随意创建、修改和删除记录。 查询参数参考.