While writing these blog posts, I often find myself saying “One of the most common questions we get is …” The interesting thing is that it’s absolutely real – we get a wide range of questions from customers, partners, community and event attendees. Naturally, we do see some patterns when looking at those questions.
Today’s quick post is no different and covers the question “Where can I find code samples for your APIs?” First thing to note is that the API Reference we published in February this year does have a code “generator” for each API endpoint. For an example, see the v3/vms/POST documentation (scroll to the bottom of the page).
While these generated code samples can certainly be used as a good reference, the follow-up question is often around “full” code samples e.g. a complete script that prompts for some information, does some error checking, provides a response, etc. That’s where today’s post comes in.
Starting now, we have a new Code Samples page. The layout and design of that page will change shortly but it’s what Developer Marketing (my team) will use to distribute various code samples to you, our valuable community members. While the initial collection is small, we already have samples for:
- Python 3.6
- Bash script
All code samples are managed via a NutanixDev Github repo – a public repo that you are welcome and encouraged to clone and use for yourself in any way you see fit. Please take note of the readme sections covering official code support, especially the parts about needing to make extensive changes before the samples will be ready for a production environment.
The success of a code samples page this, especially for the Developer Marketing team, is based in large part to feedback from you – the people that use and consume these code samples. Please don’t hesitate to get in touch with us below – we’d love to hear your feedback, comments or suggestions! 🙂