API Finger Food (Code Samples)

API Finger Food - Featured Image

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
  • PowerShell
  • C#

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! 🙂

SSH PUBLIC KEY

Copy the SSH public key below.  In BASH shell environments, for example, this file could be saved to ~/.ssh/nutanix_demo.pub

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCm+7N2tjmJw5jhPmD8MS6urZQJB42ABh73ffGQSJ0XUHgdEDfjUDFkLK0wyJCe0sF5QJnh07UQn0F0BUnBi+VwehPGeODh6S43OP5YS/14L0fyntFI06B9lckx/ygRNu82sHxXCX+6VVUFPOPC+sz6j1DQswKY9d4cEYnaMBGSzqRxrqAIf6aWIKTJTYKPFY0zaUZ6ow2iwS0Nlh5EqaXsEBWkqMmr7/auP9GV/adUgzFrGLJklYBdfH575SIK6/PZL6wNT0jE9LmFlEm7dI01ZWPclBuV16FzRyrnzmWr/ebY62A04vYBtR0vyfEfsW2ZgxgD6aAE6+ytj0v19y0elRtOaeTySN/HlXh7owKWCHnlXNpTUiSDP8SQ8LRARkhQu3KEDL0ppGCrSF87oFkp1gPzf92U+UK3LaNMMjZXMOy0zLoLEdLtbQo6S8iHggDoX4NI4sWWxcX0mtadvjy/nIOvskk9IXasQh0u0MT9ARQY5VXPluKDtEVdeow9UbvgJ1xxNkphUgsWjCiy+sjgapsuZvWqKM6TPT1i24XYaau+/Fa0vhjLb8vCMWrrtkRwGt4re243NDYcYWTzVZUFuUK0w1wqt77KgjCCeyJdsZNwrh15v780Fjqpec3EGVA0xyNbF0jn/tsnYy9jPh/6Cv767EratI97JhUxoB4gXw== no-reply@acme.com