Hi community, I need create a new droplet using api v1 and pass the “user data” parameter to create it.
I am trying with:
&user-data=#!/bin/bash echo "hello" >> /var/hello.txt
&user_data=#!/bin/bash echo "hello" >> /var/hello.txt
And url encoded:
&user-data=%23!%2Fbin%2Fbash%0Aecho%20%22hello%22%20%3E%3E%20%2Fvar%2Fhello.txt
&user_data=%23!%2Fbin%2Fbash%0Aecho%20%22hello%22%20%3E%3E%20%2Fvar%2Fhello.txt
But not work. Any help would be appreciated.
Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Version 1 of the API does not support user-data, and it is extremely unlikely that it will be added. We haven’t set a hard date yet, but it will be deprecated in the near future. You are greatly encouraged to use version 2 of the API.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.