This quick tutorial will demonstrate:
<DISTRIBUTION_INSTALL_DIR>/bin/ddf
script (or ddf.bat
on Windows)list
command in command line console - all bundles should be Active (or Resolved for fragments)go to http://localhost:8181/services and verify 3 REST services are available: metrics, catalog, and catalog/query
From this services
URL, click on the links to each REST service's WADL to see its interface.
The embedded Solr Catalog Provider is installed by default out-of-the-box as of Currently all services/endpoints in |
Create an entry in the Catalog by ingesting a valid GeoJson file (attached to this page).
This ingest can be done using:
a REST client, such as Google Chrome's Advanced REST Client
OR
by using the following curl command to POST to the Catalog REST CRUD endpoint
curl.exe -H "Content-type: application/json;id=geojson" -i -X POST -d @"C:\path\to\geojson_valid.json" http://localhost:8181/services/catalog |
curl -H "Content-type: application/json;id=geojson" -i -X POST -d @geojson_valid.json http://localhost:8181/services/catalog |
where:
-H adds a HTTP header. In this case Content-type header application/json;id=geojson
is added to match the data being sent in the request
-i requests that HTTP headers are displayed in the response
-X specifies the type of HTTP operation. For this example, it is necessary to POST (ingest) data to the server.
-d specifies the data sent in the POST request. The @ character is necessary to specify that the data is a file.
The last parameter is the server's URL to send the data to.
This should return a response similar to the following (the actual catalog ID in the id and Location URL fields will be different):
HTTP/1.1 201 Created Content-Length: 0 Date: Mon, 22 Apr 2013 22:02:22 GMT id: 44dc84da101c4f9d9f751e38d9c4d97b Location: http://localhost:8181/services/catalog/44dc84da101c4f9d9f751e38d9c4d97b Server: Jetty(7.5.4.v20111024) |
Verify the entry was successfully ingested by entering in a browser the URL returned in the POST response's HTTP header. For instance in our example, it was http://localhost:8181/services/catalog/44dc84da101c4f9d9f751e38d9c4d97b
This should display the catalog entry in XML within the browser.
Content Directory Monitor
and set the Directory Path to inbox
, and click Save.<DISTRIBUTION_INSTALL_DIR>/inbox
directory<DISTRIBUTION_INSTALL_DIR>/content/store/<GUID>/geojson_valid.json
content-rest
-endpoint
using the Features tab in the Admin consoleSend a GET
command to read the content from the content repository using the Content REST Endpoint.
This can be done using curl command below. Note that the GUID will be different for each ingest - the GUID can be determined by going to the <DISTRIBUTION_INSTALL_DIR>/content/store
directory and copying the sub-directory in this folder (there should only be one), which is the GUID.
curl -X GET http://localhost:8181/services/content/c90147bf86294d46a9d35ebbd44992c5 |
The response to the GET command will be the contents of the geojson_valid.json file originally ingested.
PNG
link for the Catalog Queries
row under the column labeled 1d
, which stands for one day. A graph of the catalog queries executed in the last 24 hours will be displayed.Click the XLS
link for the Catalog Queries
row under the column labeled 1d.
Based on the browser's configuration, either the |