Skip to content

Document or test for endpoints that should be blacklisted from the library #455

@Kamforka

Description

@Kamforka

Some API endpoints shouldn't be part of the client library as they are solely meant for the browser or for the UI.

To make the library future proof against the implementation of such endpoints we need to maintain a documentation or maybe an automated test solution which intercept the requests during the tests and matches them against blacklisted API routes and if they match then make the test fails.

List of endpoints to be blacklisted:

  • User - Add Temporary Attachment: This endpoint is for the frontend, it's for uploading pasted attachments. example: when a screenshot is pasted in a description it is not uploaded directly because it might be removed or changed while editing. We have to wait for the user to save the modifications before considering it a real attachment.
  • User - Get User Avatar: Meant for the browser.
  • User - Set user login: Not meant for the client library. It's to be able to change a user login.This feature can be heavy on the database, so it must be used with caution andis disabled by default look at /api/v1/features ->{"StreamSSE":false,"FrontendRefacto":false,"UpdateLogin":false,"ESChart":true,"DirectQuery":true}
  • Organisation - Get Attachment: The only difference should be the content-disposition header parameter of ../download/ endpoint
    The GET /attachment/ should be use if you want to display the content of an attached file in the browser, whereas the GET /attachment/download should be used if you want to download the file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions