adobe / adobe/spacecat-api-service

POST Bulk events on Key Event API

Open
#310 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
10
Forks
15
Avg merge
1d 9h
Merged PRs (30d)
150

Description

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When creating a key event, I would like to be able to post more events per site/ multi events, instead of making each time a POST request per event

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

The API should accept a multi-object array

`POST sites/{siteId}/key-events`
Body:
```
[{
"name": "Broken Internal Links",
"type": "seo",
"time": "2024-02-23T12:28:00.000Z"
}
,{
"name": "FIX:Broken Links",
"type": "seo",
"time": "2024-03-23T19:28:00.000Z"
}]
```

Currently, this fails with 500 ( "message": "Required field \"name\" is missing")

Contributor guide

Open the contributing guide

Research direction

Start by locating the POST sites/{siteId}/key-events entry point and its request validation, then inspect any related API tests. Confirm how a single key event is currently accepted and how validation handles the proposed array. Done means the endpoint accepts multiple event objects for one site, preserves the shown fields, and no longer returns the missing-name 500 for a valid array.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.