CURL Reference
On this page: Document interface examples using CURL.

Examples

Some examples use a hypothetical database admin/foo (database named foo in organization admin.)

Submit a new schema, replacing the existing schema

Use a hypothetical JSON file /tmp/testschema.json containing a schema.
1
cat /tmp/testschema.json | \
2
curl -X POST 'http://localhost:6363/api/document/admin/foo?graph_type=schema&author=me&message=hallo&full_replace=true' \
3
--data-binary @- -H 'Content-Type: application/json'
Copied!

Submit data into the instance graph

1
cat /tmp/testdata.json | \
2
curl -X POST 'http://localhost:6363/api/document/admin/foo?author=me&message=hallo' \
3
--data-binary @- -H 'Content-Type: application/json'
Copied!

Get a list of instance documents

Note the graph_type is not specified in the first example. Explicitly requesting the graph_type instance, in the second example, provides the same result.
1
curl 'http://localhost:6363/api/document/admin/foo'
Copied!
1
curl 'http://localhost:6363/api/document/admin/foo?graph_type=instance'
Copied!

Get a list of instance documents of a particular type

1
curl 'http://localhost:6363/api/document/admin/foo?type=Person'
Copied!

Get a particular instance document by id

1
curl 'http://localhost:6363/api/document/admin/foo?graph_type=instance?id=Person_Robin_1995-09-29'
Copied!

Get a list of instance documents, skipping the first 3 and retrieving 5 more

1
curl 'http://localhost:6363/api/document/admin/foo?skip=3&count=5'
Copied!

Get a list of instance documents, with each JSON object on its own line

1
curl 'http://localhost:6363/api/document/admin/foo?minimized=true'
Copied!

Get a list of instance documents, as a JSON list instead of a stream

1
curl 'http://localhost:6363/api/document/admin/foo?as_list=true'
Copied!

Delete a single object

1
curl -X DELETE \
2
'http://localhost:6363/api/document/admin/foo?uthor=me&message=blah&id=Person_1adfe57f9a2285da051445a3cf6056ef06dc1b7a'
Copied!