Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

Run the Vagrant VM

Follow the instructions at https://github.com/fcrepo4-labs/fcrepo4-vagrant for setting up the Fedora 4 Vagrant Virtual Machine.  These are essentially:

  • Clone the fcrepo4-vagrant Git repository
git clone https://github.com/fcrepo4-labs/fcrepo4-vagrant.git
cd fcrepo4-vagrant
  • Optional: Edit the install_files/config file and change the FEDORA_AUTH value to true.
  • Start the Vagrant VM:
vagrant up

Verify that audit events are created in the triplestore

curl -u fedoraAdmin:secret3 -X POST -H "Slug: object1"
curl -u fedoraAdmin:secret3 -X POST -H "Slug: file1" --data-binary "test content"
curl -u fedoraAdmin:secret3 -X PATCH -H "Content-type: application/sparql-update" --data-binary "insert data { <> <http://purl.org/dc/elements/1.1/title> \"new title\" . }"
curl -u fedoraAdmin:secret3 -X DELETE
curl -u fedoraAdmin:secret3 -X DELETE

Query audit events

Once there are audit event triples in Fuseki, you can perform queries using the Fuseki SPARQL query form:

By resource:

select ?e where { ?e <http://www.loc.gov/premis/rdf/v1#hasEventRelatedObject> <> }

By date range:

select ?e where { ?e <http://www.loc.gov/premis/rdf/v1#hasEventDateTime> ?date . FILTER (?date > "2015-04-01T10:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>) }

By event type:

select ?e where { ?e <http://www.loc.gov/premis/rdf/v1#hasEventType> <http://id.loc.gov/vocabulary/preservation/eventType/cre> }

By agent:

select ?e where { ?e <http://www.loc.gov/premis/rdf/v1#hasEventRelatedAgent> "curl/7.37.1"^^<http://www.w3.org/2001/XMLSchema#string> }
  • No labels