I’m not sure what is the question, but here is a doc for alter via Raw HTTP https://docs.dgraph.io/clients/#alter-the-database-1
These typos are related to Curl usage. You can’t use the data flag without apostrophe or a file path.
see more in https://curl.haxx.se/docs/manpage.html
And curl man page
(HTTP) Sends the specified data in a POST request to the HTTP server, in a way that can emulate as if a user has filled in a HTML form and pressed the submit button. Note that the data is sent exactly as specified with no extra processing (with all newlines cut off). The data is expected to be &zerosp;“url-encoded”. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to -F/–form. If this option is used more than once on the same command line, the data pieces specified will be merged together with a separating &-letter. Thus, using ‘-d name=daniel -d skill=lousy’ would generate a post chunk that looks like &zerosp;‘name=daniel&skill=lousy’.
If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin. The contents of the file must already be url-encoded. Multiple files can also be specified. Posting data from a file named ‘foobar’ would thus be done with --data
To post data purely binary, you should instead use the --data-binary option. -d/–data is the same as --data-ascii. If this option is used several times, the ones following the first will append data.
Source: curl man page