How do i add a linode instanc using API in windows command prompt
Hi,
I am trying to create a linode using the linode instance API..
curl -v POST "https://api.linode.com/v4/linode/instances" -H "Authorization: Bearer ad0df29385178da8623b5e3f0f9318c3b32a08bf35e06f65" -H "Content-type: application/json" -data '{/'type/': /'g6-standard-1/', /'region/': /'us-west/', /'image/': /'linode/ubuntu24.04/', /'root_pass/': /'Bakul1987/', /'label/': /'parul-api-test/'}'
when i run this via the windows 10 command Prompt i get the following error:-
{"errors": [{"reason": "Invalid JSON"}]}* Connection #1 to host api.linode.com left intact
curl: (3) [globbing] unmatched brace in column 2
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed</url>
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed</url>
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed</url>
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed</url>
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed</url>
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed</url>
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed</url>
<url> malformed</url>
Closing connection -1 curl: (3) <url> malformed curl: (3) [globbing] unmatched close brace/bracket in column 19</url>
C:\Users\parul>
Please help
2 Replies
You write:
{"errors": [{"reason": "Invalid JSON"}]}* Connection #1 to host api.linode.com left intact
curl: (3) [globbing] unmatched brace in column 2
This should tell you everything. Your request is malformed…probably being munged by the Windoze cmd shell.
-- sw