I am trying to pull information from the Chef Automate API into a custom server perspective and having a problem with a filter parameter. To pull information for a specific node, the request needs to look like this (as tested in a separate REST interface):
But when SquaredUp Web API tile processes this, it converts the : character to %3a which the Chef API rejects:
The API returned a 400 response (“Invalid filter ‘node_name%3aSERVERNAME’”)
I’ve tried different escape characters in the URL and the JSON source for the tile but nothing seems to prevent the character conversion. Is there a way to preserve this colon or do I need to find another workaround?
I’m presuming it could be something on the Chef side?
I tried using mockAPI to built a sample endpoint and when passing a string containing colons in to that it doesn’t seem to escape them?
I’ve barely used the WebAPI tile yet but taking your URL into it’s component parts I presume that the first portion (https://ChefAutomateServer) is the provider and /compliance/nodes is the path.
Is the data in form or text format? Any chance you can show the WebAPI tile configuration please?
I can send requests to the same Chef endpoint URL in Powershell and other REST tools, so it does seem to be some unnecessary conversion inside the query parameter. Correct, the first portion is the provider. Here is the tile JSON I’m working on: