Reset Data Job
From n² wiki
Nearby: Job, Job Request, Scheduled Job Collection
[edit] Overview
This is a Job that clears all of a store's data. It is primarily designed for developers to reset their store to a known state for automated testing, but can be useful in other circumstances too.
When this Job runs it removes all of the following:
- all RDF in the Metabox
- all items in the Contentbox
- all RDF in User Graphs
- all indexes of the above
Note: data deleted by this Job is non-recoverable so be sure to use it with caution
[edit] Sample
The following Job Request specifies a Reset Data Job to be run at 14:30 on the 2nd May 2008. NB Time is UTC.
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:bf="http://schemas.talis.com/2006/bigfoot/configuration#" > <bf:JobRequest> <rdfs:label>Reset the data in my store</rdfs:label> <bf:jobType rdf:resource="http://schemas.talis.com/2006/bigfoot/configuration#ResetDataJob"/> <bf:startTime>2008-05-02T14:30:00Z</bf:startTime> </bf:JobRequest> </rdf:RDF>
[edit] POST The Request
Save the job request to a file called resetstore.rdf and POST this RDF to your store's job scheduler like this:
curl -vd @resetstore.rdf --digest -u "username:password" -H content-type:application/rdf+xml http://api.talis.com/stores/@@STORENAME@@/jobs

