POST contribution endpoint on API V4
- Dominant language
- PHP
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
We need the same POST /contributions endpoint we have on V3, but with the authentified V4
Ideally, a body as simple as for the V3, but without contributor information (as we are already authentified) would be light and enough for the extension use case :
```ts
{
url: string,
message: string,
}
```
If this is too complicated with API platform, then we need an extension of the existing POST /notices
from
```json
{
"visibility": "private",
"matchingContexts": [
{
"exampleUrl": "string",
"urlRegex": "string",
"excludeUrlRegex": "string",
"description": "string",
"querySelector": "string",
"xpath": "string"
}
],
"contributor": "string",
"message": "string",
"expires": "2031-11-05T00:00:00+02:00"
}
```
to (at least) :
```json
{
"matchingContexts": [
{
"exampleUrl": "string",
"urlRegex": "string",
"description": "string",
"domainNames": [
{
"name": "some.domain.com"
}
]
}
],
"message": "string",
}
```
This endpoint, when used by a standard user, should
- not authorize setting of creation date, contributor, visibility,
- create the domainName if not existing, or link the relation if already exists
Contributor guide
Assessment
This issue has not been assessed yet.