# Upstash REST: ERR wrong number of arguments for the command
## What you see
`{ "error": "ERR wrong number of arguments for 'get' command" }`
with HTTP 400.
## Cause
The URL path segments after the command do not match the commands
arity. REST maps path segments to arguments positionally:
- GET foo becomes /get/foo (one argument)
- /get/foo/bar is two arguments to GET: wrong.
- MGET takes many: /mget/foo1/foo2/foo3 is correct.
The usual mistake is forgetting that some commands take option flags
as extra path segments: SET with expiry is
/set/foo/bar/EX/100, not /set/foo/bar with the expiry somewhere else.
## Confirm
Count the segments. Compare against the Redis command reference for
that command. Then run the same command in redis-cli with the same
arguments to prove the arity.
## Fix
- Values containing slashes break positional parsing: a value like
"a/b" becomes two segments. POST the value as the request body
instead: the body is appended as the last parameter.
- For SET with options after the value, pass the options as query
params on a POST: /set/foo?EX=100 with the value in the body.
- Or send the whole command as a JSON array body: '["SET", "foo",
"bar", "EX", 100]'.
## Verify
The same curl returns 200 with the expected result.