I'm not able to recreate the problem. I'm using the Titan Server 0.4.2 distribution and can properly create a key index as follows:
* About to connect() to localhost port 8182 (#0)
* Trying 127.0.0.1... connected
> POST /graphs/graph/keyindices/edge/test HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/
1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:8182
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=UTF-8
< server: grizzly/2.2.16
< Access-Control-Allow-Origin: *
< Date: Thu, 06 Feb 2014 12:45:57 GMT
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"version":"2.4.0","queryTime":825.529753}
* About to connect() to localhost port 8182 (#0)
* Trying 127.0.0.1... connected
> GET /graphs/graph/keyindices HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/
1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:8182
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=UTF-8
< server: grizzly/2.2.16
< Access-Control-Allow-Origin: *
< Date: Thu, 06 Feb 2014 12:47:13 GMT
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"version":"2.4.0","results":{"edge":["reason","test","place"],"vertex":["age","name"]},"queryTime":95.769981}
That said, I don't think it's good to do this. When creating indices, use the native graph APIs to do so. Titan supports the Blueprints notion of key indices, but does not create them in an optimal way. You are far better off creating them yourself with a script and the Gremlin REPL.