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

API - GET concise list of tags #2942

Open
gregoryfoster opened this issue Feb 4, 2025 · 4 comments
Open

API - GET concise list of tags #2942

gregoryfoster opened this issue Feb 4, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@gregoryfoster
Copy link

gregoryfoster commented Feb 4, 2025

Version and OS
v0.48.06, using hosted service

Is your feature request related to a problem? Please describe.
I'm unable to determine the name of particular tags/groups through the API.

Describe the solution you'd like
I'd like to retrieve a list of defined tags/groups with concise data similar to the GET request to list watches. They can be indexed by UUID and at a minimum include the tag/group name.

Describe the use-case and give concrete real-world examples
I want to assign new watches created through the API to a particular group by name, and don't want to hardcode those UUIDs in my app.

Additional context
It looks like the tag field can be used to assign to a tag/group by name on POST, so my immediate use case is not an issue; I'd still like to see the API built out in this way.

@gregoryfoster gregoryfoster added the enhancement New feature or request label Feb 4, 2025
@dgtlmoon
Copy link
Owner

dgtlmoon commented Feb 5, 2025

Hello, yes this is missing! thanks for the report!

@gregoryfoster
Copy link
Author

If the data associated with tags isn't too big, I'd encourage you to return a list of canonical representations of each tag object. Using a concise representation on the bare GET request on the watch endpoint makes sense to keep the size of the response down, but it does break an expectation that we'd receive canonical watch objects which requires some custom handling on receipt. That may not be a necessary consideration for a tag endpoint.

@dgtlmoon
Copy link
Owner

dgtlmoon commented Feb 10, 2025

We can just add ?tag=uuid to curl http://localhost:5000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45"

        @api {get} /api/v1/watch List watches
        @apiDescription Return concise list of available watches and some very basic info
        @apiExample {curl} Example usage:
            curl http://localhost:5000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45"

Aswell as a tags API endpoint (crud)

@dgtlmoon
Copy link
Owner

Saw this comment about the chrome extension which would be related

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants