Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fasseg committed Jun 3, 2013
1 parent 1015704 commit f6612a8
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions README.md
Expand Up @@ -5,59 +5,50 @@ It is designed to run fixity checks (e.g. checksum comparison) of stored Datastr

## Running the service

The service is built as a Java war file and can be run directly from maven using:

```bash
$ cd fcrepo-fixity-webapp
$ MAVEN_OPTS="-Xmx512m" mvn -Djetty.port=8180 jetty:run
```
The service is built as a Java war file and can be deployed in a ServletContainer e.g. Tomcat

Requesting the check of an object can be done using a HTTP GET request to:

GET http://localhost:8180/fixity/queue/<pid>
GET http://localhost:8180/fixity/fixity-result/queue/<pid>

To retrieve test results of an object you can query:

GET http://localhost:8180/fixity/<pid>
GET http://localhost:8180/fixity/fixity-result/<pid>

The java property `org.fcrepo.fixity.fcrepo.url` can be set to overrride the fedora4 url in the spring configuration:

MAVEN_OPTS="-Dorg.fcrepo.fixity.fcrepo.url=http://myfedora:80/fedora"

The Java property `org.fcrepo.fixity.brokerurl` can be set to overrride the default broker service url. The default value is `tcp://localhost:61616`. If you don't have a JMS broker running you can have activemq create a runtime broker for you:

MAVEN_OPTS="-Dorg.fcrepo.fixity.brokerurl=vm://fixitybroker"

## JSON/XML Endpoints

The webapp supports the following operations, and the fixity service will by default return JSON in order to request XML content from the fixity service `-H "Accept:application/xml"` can be used as an argument for cURL

### Get the first 50 fixity results

curl "http://localhost:8180/rest/results"
curl "http://localhost:8180/fixity/fixity-results/"

### Get fixity results by offset and length

curl "http://localhost:8180/rest/results/0/10"
curl "http://localhost:8180/fixity/fixity-results/0/10"

### Get a specific fixity result

curl "http://localhost:8180/rest/results/testobj-1"
curl "http://localhost:8180/fixity/fixity-results/testobj-1"

### Get general fixity statistics

curl "http://localhost:8180/rest/results/statistics/general"
curl "http://localhost:8180/fixity/fixity-results/statistics/general"

### Get daily fixity statistics for the last 30 days

curl "http://localhost:8180/rest/results/statistics/daily"
curl "http://localhost:8180/fixity/fixity-results/statistics/daily"

### Get fixity details for a specific fixity check

curl "http://localhost:8180/rest/results/details/1"
curl "http://localhost:8180/fixity/fixity-results/details/1"

### Queue a pid for a fixity check (hacky via url param atm)

curl -X POST "http://localhost:8180/rest/results/queue?pid=testobj-1"
curl -X POST "http://localhost:8180/fixity/fixity-results/queue?pid=testobj-1"


0 comments on commit f6612a8

Please sign in to comment.