Julian
Julian

Reputation: 1070

OrientDB: Creating Graph-database through HTTP-API

It seems it is only possible to create document-type databases via the HTTP-api. The documentation omit's information about whether the database will be created as a graph or a documentdatabase, but when creating a vertext, i get the error:

Super-class V not exists

...which, as i understand, means that the database is a document-type. Is there any way around this? The /command/ action makes it pretty easy for me to do what I want from C#, if I could only generate a graph-database via HTTP-api...

Is there any way to create a graph-database through the HTTP-API?

Alternatively: Is there another way to create a graph-database from c#? I've tried creating a database via the console, but here i get IllegalArgumentException:

Error: java.lang.IllegalArgumentException: Storage type 'plocal' is different by storage type in URL

..which i cannot find any explenation for

Any help is much appreciated :)

Upvotes: 0

Views: 281

Answers (2)

Stanislav Trifan
Stanislav Trifan

Reputation: 154

I managed to have that using POST http://localhost:2480/database/<db name>/plocal/graph

I did found it experimentally. Did not found that in documentation which is a bit strange. Tested on version 2.1.7

Upvotes: 2

Erich
Erich

Reputation: 16

I got the same error message when I typed in the following command:

create database REMOTE:localhost/petshop root aaaa plocal document

Solution: I had to write it in lower case:

create database remote:localhost/petshop root aaaa plocal document

Upvotes: 0

Related Questions