We have updated our Terms of Service, Code of Conduct, and Addendum.

404 Error when querying the API

Options

I am running a distributed environment, and when I use the API Reference
to query an endpoint it returns Status Code 404. How can I resolve
this?

Tagged:

Best Answer

  • Jeremy Prescott
    Jeremy Prescott Posts: 33 ✭✭
    Answer ✓
    Options

    The Cribl API reference that’s baked into the
    product, which is statically generated, isn’t aware that you’re in a
    distributed environment - so the endpoints don’t reflect that.

    Based on your screenshot, this was the endpoint: <BASE_URL>**/api/v1/system/status/outputs**
    Whereas, in a Distributed Environment it would be: <BASE_URL>**/api/v1/m/<WORKER_GROUP_NAME>/system/outputs**

    • Where you would replace the <WORKER_GROUP_NAME> with the name of the Worker Group
      • http://192.168.1.147:9000/api/v1/m/default/system/outputs

Answers

  • Jeremy Prescott
    Jeremy Prescott Posts: 33 ✭✭
    Answer ✓
    Options

    The Cribl API reference that’s baked into the
    product, which is statically generated, isn’t aware that you’re in a
    distributed environment - so the endpoints don’t reflect that.

    Based on your screenshot, this was the endpoint: <BASE_URL>**/api/v1/system/status/outputs**
    Whereas, in a Distributed Environment it would be: <BASE_URL>**/api/v1/m/<WORKER_GROUP_NAME>/system/outputs**

    • Where you would replace the <WORKER_GROUP_NAME> with the name of the Worker Group
      • http://192.168.1.147:9000/api/v1/m/default/system/outputs