Skip to content

JobMon API Install

Brian Brewder edited this page Oct 17, 2016 · 1 revision

An install in JobMon represents a job that is installed on an agent. A job requires an installation in order to be executed on a particular server.

Install Schema

  • _id: The unique identifier for the document. Set by MongoDB.
  • job: The _id of the job. This field might be replaced with the job document in some calls. OBJECTID, REQUIRED, REF=JOB
  • agent: The _id of the agent that the job is installed on. This field might be replaced with the agent document in some calls. OBJECTID, REQUIRED, REF=AGENT
  • fileHash: The hash of the installed job file. If this value differs from what is in Job.fileHash, the job is uninstalled and the new job is installed. Set by the agent once the job is actually installed on the server. STRING
  • uninstall: Determines if the job should be uninstalled from the agent. If true, this install is marked for uninstallation. This record will be deleted once the agent uninstalls it. BOOLEAN

GET /api/installs

This will return a list of installs. Can be used with query parameters.

Possible Errors (status 400):

  • QueryError: Error returned by MongoDB due to a problem with the query.

POST /api/installs

Installs the job on the agent. The actual installation won't occur until the JobMon scheduler attempts to start the job on that agent for the first time.

Possible Errors (status 400):

  • InvalidJob: The job does not have a valid install file.

GET /api/installs/{install._id}

Gets the document for the requested install.

PATCH /api/installs/{install._id}

Updates just the supplied values. The only fields that can be updated are the fileHash and uninstall fields.

DELETE /api/installs/{install._id}

Removes the install document. WARNING, this should only be called by the agent once the job has been uninstalled or the job will become orphaned on the server.

Clone this wiki locally