New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
A label is not meant as an identifier and shall never be used as such. ID is in "instance-id" for a reason ;-)
You could always just fetch all your instances through https://api.vultr.com/v2/instances and iterate through its output until you find a match.
Maybe it is an idea to do the above once so you can map label-instance-id and then migrate to storing / referencing instance-ids internally instead?
I am looking to do it extarnally as I want to be able to automaticly create and remove VMs.
https://www.vultr.com/api/v2/#operation/create-instance
Do note: "Developer Preview Only - Not Intended For Production Use"
Here you go [gist]