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

[Feature request] Create a flexible endpoint for documents #334

Open
stateandprove opened this issue Jul 28, 2023 · 0 comments
Open

[Feature request] Create a flexible endpoint for documents #334

stateandprove opened this issue Jul 28, 2023 · 0 comments

Comments

@stateandprove
Copy link

Current behaviour

There is currently an endpoint /rest/v1/id/xxx-xxx in the application that is responsible for a particular CRE instance. Such an instance has a unique identifier, which is a pair of three-digit numbers separated by a dash. Within the body of this instance there are links to other CREs and documents. If we want to get any linked CRE instance, we can easily get it using the above mentioned endpoint via its id.

Problem

This approach allows us to easily move from parent to child CRE instances and vice versa, but it doesn't include other many-to-many relationships, i.e. between CRE and linked document. It doesn't allow us to get a lot of important information, such as

  • documents of a certain type for a given CRE
  • all CREs linked to this document
    etc.

Feature Request

Using queryset parameters, we could easily solve both problems with the following requests:
/rest/v1/document/?CRE=xxx-xxx solves the first problem and
/rest/v1/document/?CRE=xxx-xxx&doctype=Standard solves the second.

So the request is to combine all documents within an endpoint and add the ability to filter document instances using the queryset parameter.
This would solve the problem mentioned in the #285 ticket and add other important functionality.

@stateandprove stateandprove changed the title Create a flexibly documents endpoint Create a flexible endpoint for documents Jul 28, 2023
@stateandprove stateandprove changed the title Create a flexible endpoint for documents [Feature request] Create a flexible endpoint for documents Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant