Development

Vultr you have a small inconvenience with your api docs.

Playing around with the Vultr api in PHP and i got stuck. I was getting the GET requests fine with curl but some of the calls have optional features. Such as listing availabilities for a location and certain plan availabilities.

Here is a screenshot from Vultr’s api docs where they ‘explain’ an optional parameter:So looking at that i get you use the URL https://api.vultr.com/v1/regions/list in the curl but how do you get the availabilities? I know you can put ?parameter1=yes&parameter2=jim in a api call but what exact parameter do I need to use in this case???

It’s actually https://api.vultr.com/v1/regions/list?availability=yes or https://api.vultr.com/v1/regions/list?availability=no

To me and maybe its just me but the way Vultr has it displayed above is not helpful one bit! They need to break it up and have the actual parameter “availability” on its own, what string you can have for it and what they do. All clear and separate, because as of right now there is no way to tell that availability is the parameter.

Aside from this annoyance the Vultr api is plentiful and has potential for some side projects.

Share

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

1 year ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

1 year ago

FTP getting array of file details such as size using PHP

Using FTP and PHP to get an array of file details such as size and…

2 years ago

Creating Laravel form requests

Creating and using Laravel form requests to create cleaner code, separation and reusability for your…

2 years ago

Improving the default Laravel login and register views

Improving the default Laravel login and register views in such a simple manner but making…

2 years ago

Laravel validation for checking if value exists in the database

Laravel validation for checking if a field value exists in the database. The validation rule…

2 years ago