Skip to content

Job Submission State

Eric Lopatin edited this page Aug 12, 2022 · 5 revisions

Obtaining Submission State

Merritt ingests content in Batches. A Batch is simply a way to describe an amount of work for the system to process. Batches may have one or more Jobs within them. Each Job can be considered an individual unit of work which results in the creation of a digital object in a Merritt collection.

Collections in Merritt can be configured to POST Job submission state, or status, to a user-provided endpoint. The status message takes the form of JSON and provides the following information:

  • Submission Date: Timestamp indicating when the job began processing.
  • Job Status: FAILED, COMPLETED
  • Version ID: Latest version of the resulting object.
  • Object Title: Title of the resulting object.
  • Persistent URL: A persistent URL that can be used to locate the object.
  • Job ID: Unique job identifier internal to the Merritt system.
  • Primary ID: Primary identifier for the object, which takes the form of an Archival Resource Key (ARK).
  • Completion Date: Timestamp indicating when the job was completed.
  • Package Name: Name of the file or container submitted.

State information is posted upon failure or completion of an individual Job.

User Requirements

  • A user must provide an endpoint to which status can be posted.
  • Expect to receive a POST with the following pathname to the endpoint for every object:
    • <endpoint>/mc/<job ID>
    • Example: http://myendpoint.com/mc/jid-d16551c6-1c0f-4626-be0b-dd5ad50fa482
  • The provided endpoint should support Basic Authentication credentials: username/password only
  • IP filter access to endpoint: Merritt has a defined set of Ingest service hosts that will contact the endpoint. IP addresses for these hosts must be allowed access through the user's firewall.
  • Interpretation of the JSON payload should be supported by the endpoint service.

Sample Payload

{
	"job:jobState": {
		"xmlns:job": "http://uc3.cdlib.org/ontology/mrt/ingest/job",
		"job:submissionDate": "2022-08-11T14:15:10-07:00",
		"job:jobStatus": "COMPLETED",
		"job:versionID": 1,
		"job:objectTitle": "Test local callback server",
		"job:persistentURL": "http://n2t.net/ark:/99999/fk4f20h55p",
		"job:jobID": "jid-d16551c6-1c0f-4626-be0b-dd5ad50fa482",
		"job:primaryID": "ark:/99999/fk4f20h55p",
		"job:retainTargetURL": false,
		"job:completionDate": "2022-08-11T14:15:11-07:00",
		"job:packageName": "test.file"
	}
}