/alter endpoint: Unexpected token

Calling this:
curl -X POST localhost:8080/alter -d '{"drop_all": true}'

I get:
{"errors":[{"message":"line 1 column 0: Unexpected token: lex.Item [6] \"{\" at 1:0 while parsing schema","extensions":{"code":"Error"}}]}

Also Ratel needs to be restarted or relaunched choosing the Ratel version from http://localhost:8000/

curl -X POST localhost:8080/alter -d 'name: string @index(term) .'
Is working, just to verify that some altering is working.

It is normal around here. It must be something else.

And Ratel can’t be related. Cuz it is another binary and is totally independent from Dgraph itself.

Thanks @MichelDiz

I realised I was calling curl from a PowerShell command line, and this seemed to be the problem. Sorry for taking you time on this - thanks again.

And if someone else like PowerShell:
Invoke-RestMethod -Method Post -Uri http://localhost:8080/alter -Body '{"drop_all": true}'

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.