Job
From n² wiki
This is the Platform API documentation for the URI associated with a specific Job.
Every Job associated with a Store can be accessed via the Scheduled Jobs Collection.
This service provides access to job metadata and the ability to remove a job from the collection.
Contents |
[edit] URI Pattern
http://api.talis.com/stores/{storename}/jobs/{id}
[edit] Resource Operations
| URI Pattern | Method | Request Body | Semantics | Capability required |
|---|---|---|---|---|
| /jobs/{id} | GET | View a scheduled job | full update | |
| DELETE | Delete a job | full update |
[edit] Request Parameters
None
[edit] Job Control
[edit] View A Job
A GET request on the URI for a Job will return the metadata associated with the Job. This operation requires the full update capability.
The response is an RDF/XML document, e.g:
<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>
A job request will have three basic properties:
- A human-readable label, describing the job
- A type
- A start time.
Note that the time assigned to a Job indicates the earliest time at which it will be executed. The actual time of execution may be any time after the requested time.
[edit] Delete A Job
A DELETE request sent to the URI for a Job will delete the job, removing it from the Scheduled Jobs Collection. This operation requires the full update capability.
[edit] Add A Job
Adding a Job requires modifying the Scheduled Jobs Collection by POSTing a new job description. Read the collection documentation for further information. The following list defines the currently supported job types.
[edit] Updating A Job
Updating is not currently supported. You must first remove the old job and then submit a new one.
[edit] Types of Job
- Reset Data Job - clears all of a store's content and metadata
- Snapshot Job - creates a snapshot of a store's content and metadata
- Restore Job - replaces a store's content and metadata with that contained in a snapshot
- Reindex Job - reindexes the metadata in a store

