Chef Ideas

We believe that the best way to build software is to do it in close collaboration with the people who use it. We invite you to submit your ideas using the form below. Please be sure to include the problem for which you are solving and the benefits of implementing the idea.

We do our best to implement as many Ideas as we can. Our Product team will evaluate all submitted ideas in a timely manner and will disposition each into one of the following categories: will integrate into the product roadmap, further research is needed, unlikely to implement.

Thanks for collaborating with us!

Standardize APIs more consistently across services

Currently, if I want to export data from a `cfgmgmt` endpoint via the api using a curl, I can use `-d` to send a requestBody stating what output type I want (json), that looks like this:
```

curl -sS -H "api-token: ${token}" "https://${automate_url}/api/v0/cfgmgmt/nodes/export" -d '{"output_type":"json","filter":[],"sorting":{"field":"name","order":0}}'

```


However, if I try to use one of the compliance endpoints, that requestBody is fairly different:
```

curl -sS -H "api-token: ${token}" "https://${automate_url}/api/v0/compliance/reporting/export" -d '{"type":"json","filters":[{"type":"start_time","values":["2019-11-12T00:00:00Z"]},{"type":"end_time","values":["2019-11-12T23:59:59Z"]}]}'

```

 

One can see that the way to specify desired output type is different, This is just a small example that makes using the API difficult to use. Small discrepancies like this might also make it harder to document and patch correct usage of the api.

Another example is `filter` vs. `filters` in the above code blocks.

  • Guest
  • Nov 14 2019
  • Archive
  • Attach files
  • Admin
    Mike Krasnow commented
    23 Jul 20:23

    Hi Tom - Thanks for the feedback. We are working now to establish a unified API standard across our products, however it would be a monumental undertaking to go back and fix the Automate API to align to these standards.

    I'm going to mark this idea as "unlikely," but we'll work to fix this as we go forward with new features and products.