Skip to content
New issue

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

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

Already on GitHub? # to your account

Enhance the endpoint to fetch the file contents of the configuration server with the possibility to specify a version #895

Closed
mariusoe opened this issue Aug 5, 2020 · 1 comment · Fixed by #910
Assignees
Labels
area/config-server enhancement New feature or request

Comments

@mariusoe
Copy link
Member

mariusoe commented Aug 5, 2020

The configuration server offers the possibility to fetch the content of configuration files of the workspace branch (which is used by the UI for example). Currently, the workspace branch is always used as a basis.

In this ticket this endpoint should be extended so that a specific version can be specified (based on the commit ID) to which the resulting filte content refers. This should make it possible to get the content of a file in a specific version (commit). It should be possible to specify the ID using a request parameter called version.

Example: /api/v1/files/example.yml?version=e3004bed2cf2ba75a4d49d5383919223be58bc5f

By default, the content of the file located in the latest version of the workspace branch should be used (for example, if no version parameter is specified).

It should also be possible to fetch the file content of file located on the configuration server's live branch. For this purpose, a special verison id can be reserved, e.g. live, which causes to use the current live branch as basis of the file content.

Example: /api/v1/files/example.yml?version=live

This enhancement should only refer to the read access of the file content (GET /api/v1/files/...). Write access to specific versions should not be allowed!

@mariusoe mariusoe added enhancement New feature or request area/config-server labels Aug 5, 2020
@fylip97 fylip97 self-assigned this Aug 6, 2020
mariusoe added a commit that referenced this issue Sep 2, 2020
…y to specify a version (#910)

Co-authored-by: Marius Oehler <marius.oehler@novatec-gmbh.de>
@mariusoe
Copy link
Member Author

mariusoe commented Sep 4, 2020

closed by #910

@mariusoe mariusoe closed this as completed Sep 4, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/config-server enhancement New feature or request
Projects
None yet
2 participants