Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Support for /search endpoints #190

Open
gbolo opened this issue Nov 27, 2019 · 3 comments
Open

Support for /search endpoints #190

gbolo opened this issue Nov 27, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@gbolo
Copy link

gbolo commented Nov 27, 2019

This is an excellent project which captures most of the graylog API. While I understand that the goal here was to support API calls that would help configure the graylog instance (hence the terraform provider), wouldn't it be great if it also supported the /search endpoints so that it would be feature complete?

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Nov 27, 2019
@suzuki-shunsuke
Copy link
Owner

Thank you for your feedback!
I agree.

I checked API by Graylog's API browser http://127.0.0.1:9000/api/api-browser .
It seems that there are some /search API.

  • Enterprise/Search : Searching
  • Search/Absolute : Message search
  • Search/Decorators : Message search decorators
  • Search/Keyword : Message search
  • Search/Relative : Message search
  • Search/Saved : Saved searches

Which API do you need?
I want to decide the priority.

I'm not familiar with some API, but I think it is good to support Search/Saved : Saved searches at first.

@suzuki-shunsuke
Copy link
Owner

📝

GET /search/savedGet a list of all saved searches

{
  "total": 1,
  "searches": [
    {
      "id": "5ddf10826df4af000ede1275",
      "title": "test",
      "query": {
        "rangeType": "relative",
        "streamId": "000000000000000000000001",
        "fields": "message,source",
        "relative": 300,
        "query": ""
      },
      "created_at": "2019-11-28T00:10:42.814Z",
      "creator_user_id": "admin"
    }
  ]
}

@gbolo
Copy link
Author

gbolo commented Nov 29, 2019

Hi @suzuki-shunsuke
Thanks for your quick reply. I typically use GET /search/universal/relative. This is a very useful endpoint to retrive any logs that you are searching for. The saved search would be more suitable for your terraform provider though. If there is any way I can help you, please let me know.

Thanks again

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

No branches or pull requests

2 participants