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

Updating logbooks, tags and properties #164

Closed
UrbanBobek opened this issue Apr 18, 2023 · 2 comments
Closed

Updating logbooks, tags and properties #164

UrbanBobek opened this issue Apr 18, 2023 · 2 comments

Comments

@UrbanBobek
Copy link

Hi all,

what is the correct way to update the logbooks, tags and properties of the OLog service?

I am trying to find a way to change the logbooks, tags and properties of the OLog service. Currently I running the service with the command

java -jar service-olog-4.7.4-SNAPSHOT.jar --spring.config.location=custom.properties

and inside the custom.properties file I specify that custom logbook and tags .json files should be used

default.logbook.url=file:///path/to/logbooks.json
default.tags.url=file:///path/to/tags.json

When I, e.g., remove an old logbook and add a new one in the logbooks.json file and restart the service to apply the changes, the new logbook is created, but the old one still exist. In other words, the old logbooks continue to be stored in Elasticsearch and are thus still available for selection in the "Send to Log Book" application in Phoebus.

I also noticed there is an open issue (#5) proposing an import and export mechanism for these configuration files, but as far as I can see this has not be implemented yet?

Any help will be greatly appreciated,
Urban

@georgweiss
Copy link
Member

georgweiss commented May 9, 2023

Sorry for delayed response.

You can delete a logbook using the REST API, i.e. send a HTTP DELETE request to URL

http(s)://<host>/Olog/logbooks/<logbook_name>

e.g.

curl -X DELETE -u "<username>:<password>" http(s)://<host>/Olog/logbooks/<logbook_name>

Tags can be deleted in a similar manner, e.g.
curl -X DELETE -u "<username>:<password>" http(s)://<host>/Olog/tags/<tag_name>

@UrbanBobek
Copy link
Author

No problem and thank you for the commands! Using them I was able to delete the old logbooks and tags.

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

2 participants