SourceForge has been redesigned. Learn more.

Creating a New Data Set with the REST API

  • Daniel Yacob

    Daniel Yacob - 2013-01-30


    I would like to create new data sets with purely the REST API but have not been able to understand the documentation in the wiki, which begins:


    POST /namespace



    what would the BODY be for a new data set?  The documentation continues:

    "You MUST specify at least the following property in order to create a non-default data set:


    where NAMESPACE is the name of the new data set."

    Is this property set in the file or is it part of the BODY?  A small example would be great.



  • Daniel Yacob

    Daniel Yacob - 2013-01-30


    Thank you for the response and for enhancing the documentation, it definitely reads more clearly.  Is there an that needs to be set to first enable Multi-Tenancy? 

    When I try the simple "DESCRIBE DATA SETS", I get a 404 for /namespace -I'm assuming it will describe the kb data set when there are no others.

    My create data set post appears as follows, I get the same 404 response.  I think I'm missing critical bit of info.

    POST /bigdata/namespace HTTP/1.1
    Content-Type: text/plain;charset=utf-8
    User-Agent: http4e/5.0.6
    Content-Length: 40




  • Daniel Yacob

    Daniel Yacob - 2013-01-30

    I noticed now that in the WEB-INF/web.xml file that comes with Bigdata 1.2.2 there is no url-pattern entry for /namespace .  What web service should it be associated with?

  • Bryan Thompson

    Bryan Thompson - 2013-01-31

    The multi-tenancy API is handled by the MultiTenancyServlet.  Requests are routed to that servlet by (if I recall) the RESTSerlet.

    There are no special properties required to enable multi-tenancy mode on a Journal or Federation.

    If you are using the dev branch (branches/BIGDATA_RELEASE_1_2_0) then there are linked on the index.html page for the NSS that will list out all of the known KB namespaces and their SPARQL end points.


  • Bryan Thompson

    Bryan Thompson - 2013-01-31

    Here is the relevant snip from index.html.

    The following URLs should be active when deployed in the default configuration:
    <dd>This page.</dd>
    <dd>The SPARQL REST API (<a href="sparql">Service Description</a>).</dd>
    <dd>VoID <a href="namespace">graph of available KBs</a> from this service.</dd>
    <dd>A <a href="status">status</a> page.</dd>
    <dd>A <a href="counters"> performance counters</a> page.</dd>
  • Daniel Yacob

    Daniel Yacob - 2013-01-31

    Thank you for the replies.  I understand the issue now is that the multi-tenancy support was not included in the 1.2.2 war file.  The last sentence of the "Multi-Tenancy API" topic on the  front page of the Bigdata Blog "It will be part of the 1.2.2 maintenance release." had me expecting otherwise.

    I'm retrieving the branch now to have a go at building a new war.


Log in to post a comment.