Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST contribution endpoint on API V4 #406

Open
JalilArfaoui opened this issue Jul 5, 2021 · 2 comments
Open

POST contribution endpoint on API V4 #406

JalilArfaoui opened this issue Jul 5, 2021 · 2 comments
Assignees
Labels
API 🤖 All things related to the current API (v4) Size M 👕 Medium effort/time

Comments

@JalilArfaoui
Copy link
Member

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 :

{
  url: string,
  message: string,
}

If this is too complicated with API platform, then we need an extension of the existing POST /notices

from

{
  "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) :

{
  "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
@JalilArfaoui JalilArfaoui added API 🤖 All things related to the current API (v4) Size M 👕 Medium effort/time labels Jul 5, 2021
@MaartenLMEM
Copy link
Contributor

@Goutte on parle demain de cette issue, ses enjeux et le timing

@JalilArfaoui
Copy link
Member Author

@Goutte tell me if you want to discuss this !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API 🤖 All things related to the current API (v4) Size M 👕 Medium effort/time
Projects
None yet
Development

No branches or pull requests

3 participants