0

I am encounter a parsing error when following the Apache Usergrid documents when creating a new application.

curl -H "Authorization: Bearer <authorization token>" -H "Content-Type: 
application/json" -X POST -d '{ "name" : "resturantapp" }' http://localhost:8080
/management/orgs/ResturantOrg/apps

The instruction that I am following are:

curl -H "Authorization: Bearer [the management token from above]" \
-H "Content-Type: application/json" \
-X POST -d '{ "name":"myapp" }' \
http://localhost:8080/management/orgs/myfirstorg/apps

But the error that I am getting is: curl: (3) [globbing] unmatched close brace/bracket at pos 14 {"error":"json_parse","timestamp":1410189449209,"duration":0,"exception":"org.co dehaus.jackson.JsonParseException","error_description":"Unexpected character ('n ' (code 110)): was expecting double-quote to start field name\n at [Source: org. apache.usergrid.rest.filters.MeteringFilter$InputStreamAdapter@5ce201; line: 1, column: 4]"}

I cannot see where I am typing in the Unexpected character.

Alex T
  • 13
  • 2

1 Answers1

0

Alex, your curl looks correct to me, but maybe try a different format (notice token is in query string):

curl -X POST https://api.usergrid.com/management/organizations//applications?access_token= -d '{"name":"myapp"}'

I just ran this call sucessfully against my setup.

rockerston
  • 521
  • 2
  • 10
  • I set had just setup usergrid on a Linux VM and ran the curl that I had above and it worked just fine so I'm getting the feeling that it may have something to do with the Windows deployment of usergrid. – Alex T Sep 09 '14 at 16:32
  • on windows you will have to escape the curl command unless you are using cygwin. – rockerston Sep 10 '14 at 21:38