Report this

What is the reason for this report?

How to create a droplet with user-data from api v1

Posted on January 14, 2015

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.