Examples of Control Web Service requests

This topic includes examples of the various Control Web Service requests.

The examples in this topic were generated using the soapUI utility.

Creating an Endeca data store

The createDataStore operation lets you create a new Endeca data store, including a new set of data files, as in this example:
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:createDataStore>
         <ns:dataStoreConfig>
            <ns:name>books</ns:name>
            <ns:dataFiles>c:\endeca\apps\books</ns:dataFiles>
            <ns:wsPort>8000</ns:wsPort>
            <ns:bulkLoadPort>8001</ns:bulkLoadPort>
            <ns:startupTimeoutSeconds>90</ns:startupTimeoutSeconds>
            <ns:shutdownTimeoutSeconds>120</ns:shutdownTimeoutSeconds>
            <ns:arg>--threads</ns:arg>
            <ns:arg>6</ns:arg>
         </ns:dataStoreConfig>
      </ns:createDataStore>
   </soapenv:Body>
</soapenv:Envelope>

The name attribute specifies the name of the Endeca data store to be created, while the dataFiles attribute specifies the location of the data store's data files if they should be created in a non-default location.

Also note that the arg attribute cannot parse spaces. Therefore, for flags that take parameters, use one arg attribute for the flag itself and a second arg attribute for the parameter. It is for this reason that the --threads 6 flag in the example is specified as:
<ns:arg>--threads</ns:arg>
<ns:arg>6</ns:arg>
If the request is successful, the createDataStoreResponse will be:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <createDataStoreResponse xmlns="http://www.endeca.com/endeca-server/control/1/0"/>
   </soap:Body>
</soap:Envelope>

Attaching an Endeca data store

An attachDataStore operation example is not included because its elements and attributes are identical to the createDataStore operation. The only difference in implementation is that an attachDataStore operation must use the dataFiles element to point to an existing data files, while a createDataStore operation can omit the dataFiles element.

Starting an Endeca data store

The startDataStore operation starts a stopped Endeca store, as in this example that starts the wine data store:
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:startDataStore>
         <ns:name>wine</ns:name>
      </ns:startDataStore>
   </soapenv:Body>
</soapenv:Envelope>

The name attribute specifies the name of the Endeca data store to be started.

If the request is successful, the startDataStoreResponse will be:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <startDataStoreResponse xmlns="http://www.endeca.com/endeca-server/control/1/0"/>
   </soap:Body>
</soap:Envelope>

Listing all Endeca data stores

The listDataStores operation lists the names of all attached Endeca data stores:
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:listDataStores/>
   </soapenv:Body>
</soapenv:Envelope>
If the request is successful, the listDataStoresResponse will look similar to this example:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <listDataStoresResponse xmlns="http://www.endeca.com/endeca-server/control/1/0">
         <dataStoreNames>beer</dataStoreNames>
         <dataStoreNames>wine</dataStoreNames>
      </listDataStoresResponse>
   </soap:Body>
</soap:Envelope>

Getting the status of an Endeca data store

The dataStoreStatus operation retrieves the topped Endeca data store, as in this example:
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:dataStoreStatus>
         <ns:name>wine</ns:name>
      </ns:dataStoreStatus>
   </soapenv:Body>
</soapenv:Envelope>

The name attribute specifies the name of the Endeca data store whose status is to be retrieved.

If the request is successful, the dataStoreStatusResponse will be similar to this example:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <dataStoreStatusResponse xmlns="http://www.endeca.com/endeca-server/control/1/0">
         <config>
            <name>wine</name>
            <dataFiles>c:\endeca\apps\wine</dataFiles>
            <wsPort>7771</wsPort>
            <bulkLoadPort>7772</bulkLoadPort>
            <startupTimeoutSeconds>60</startupTimeoutSeconds>
            <shutdownTimeoutSeconds>60</shutdownTimeoutSeconds>
            <arg>--coordinator_port</arg>
            <arg>2181</arg>
            <arg>--coordinator_host</arg>
            <arg>localhost</arg>
         </config>
         <state>Started</state>
      </dataStoreStatusResponse>
   </soap:Body>
</soap:Envelope>

In the response, the state element shows whether the data store is started or stopped.

Stopping an Endeca data store

The stopDataStore operation stops a started Endeca data store, as in this example that stops the wine data store:
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:stopDataStore>
         <ns:name>wine</ns:name>
      </ns:stopDataStore>
   </soapenv:Body>
</soapenv:Envelope>

The name attribute specifies the name of the Endeca data store to be stopped.

If the request is successful, the stopDataStoreResponse will be:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <stopDataStoreResponse xmlns="http://www.endeca.com/endeca-server/control/1/0">
         <terminationType>Normal</terminationType>
      </stopDataStoreResponse>
   </soap:Body>
</soap:Envelope>
In the response, the terminationType element lists how the stop operation was accomplished:
  • Normal indicates a normal, graceful shutdown (i.e., the Dgraph was shut down within its configured shutdown timeout period).
  • Killed on Timeout means the Dgraph could not be shut down within its configured shutdown timeout period and thus the Dgraph process was killed by the Endeca Server.

Detaching an Endeca data store

The detachDataStore operation detaches a stopped Endeca data store, as in this example that detaches the books data store:
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:detachDataStore>
         <ns:name>books</ns:name>
      </ns:detachDataStore>
   </soapenv:Body>
</soapenv:Envelope>

The name attribute specifies the name of the Endeca data store to be detached.

If the request is successful, the detachDataStoreResponse will be:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <detachDataStoreResponse xmlns="http://www.endeca.com/endeca-server/control/1/0"/>
   </soap:Body>
</soap:Envelope>

Displaying version information

The version operation displays the version of the Oracle Endeca Server and the versions of the started Dgraph processes.
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:version/>
   </soapenv:Body>
</soapenv:Envelope>
If the request is successful, the versionResponse will be similar to this example:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <versionResponse xmlns="http://www.endeca.com/endeca-server/control/1/0">
         <serverVersion>Oracle Endeca Server 7.4.0.701 
            hudson-label=endeca-server-project-windows-2960</serverVersion>
         <dataStoreVersions>
            <name>quickstart</name>
            <version>7.4.0</version>
            <build>7.4.0.665981</build>
         </dataStoreVersions>
      </versionResponse>
   </soap:Body>
</soap:Envelope>

Displaying Dgraph flag usage information

The usage operation displays usage information for the Dgraph flags.
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/endeca-server/control/1/0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:usage/>
   </soapenv:Body>
</soapenv:Envelope>

If the request is successful, the usageResponse will display a list of Dgraph flags.