On Tuesday, May 12, 2015 at 2:42:33 PM UTC-5, Tailai Wen wrote:
>
> I tried http://localhost:2480/command/myTest/sql/create%20class%20Company 
> <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A2480%2Fcommand%2FmyTest%2Fsql%2Fcreate%2520class%2520Company&sa=D&sntz=1&usg=AFQjCNEOBJ75kCFYhXlVVtpZ_rNA757VcA>
>  
> and expected it will create a class "Company" to the database "myTest".
>
> I received the following error 
> "com.orientechnologies.orient.core.exception.OCommandExecutionException: 
> Cannot execute non idempotent command using HTTP GET".
>
> I think I'm using POST instead of GET. So I'm confused what I missed 
> here...
>
> Thank you!
>

In the manual

POST - Class 

Create a new class where the schema of the vertexes or edges is known. 
OrientDB allows (encourages) classes to be derived from other class 
definitions – this is achieved by using the COMMAND 
<http://orientdb.com/docs/last/OrientDB-REST.html#postCommand> call with an 
OrientDB SQL command. Returns the id of the new class created.

Syntax: http://<server>:[<port>]/class/<database>/<class-name>

HTTP POST request: http://localhost:2480/class/demo/Address2 HTTP response: 
9
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to