question on creating new class via http

27 views
Skip to first unread message

Tailai Wen

unread,
May 12, 2015, 3:42:33 PM5/12/15
to orient-...@googlegroups.com
I tried http://localhost:2480/command/myTest/sql/create%20class%20Company 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!

mmm mmm

unread,
May 12, 2015, 6:42:11 PM5/12/15
to orient-...@googlegroups.com

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 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

 
Reply all
Reply to author
Forward
0 new messages