Jobs

Request
Description external systems may request jobs to be executed on demand.
Context https://<instance>.optimizemyday.com/omdservices-basic/rest/v1/services/script
URL /run
Method GET
Response Code 200 when successful, another HTTP status code otherwise
Success Response A document containing the logged messages produced during the execution of the job.
Response Type XML or JSON
Parameter Datatype Description
configId Integer The identifier of the configuration.
job String The external identifier of the job.
async String Indicates that the call must be processed asynchronously, i.e. the call will return immediately and the run will be executed in the background. Defaults to false if omitted.
persist String Indicates if the changes must be persisted to the database. Defaults to true if omitted.
_output String The requested output format being xml or json. If omitted, xml is assumed.

Jobs are configured by the OMD Consultant within OMD Go. Refer to the Configuration Guide for details on the Job concept.

Sample Call

https://sandbox.optimizemyday.com/omdservices-basic/rest/v1/services/script/run?configId=16167225&job=fillTrips

Sample Result

<Result success="true"><log>
  <record>
    <date>2017-10-10T01:39:37</date>
  <millis>1507592377835</millis>
    <sequence>47324</sequence>
    <logger>job_5040ba24-ee41-4318-8650-f40005c84473</logger>
    <level>INFO</level>
    <class>omd.domain.s8.beans.JobRunnerBean</class>
    <method>runJob</method>
    <thread>40</thread>
    <message>Running job 353</message>
  </record>
  <record>
    <date>2017-10-10T01:39:40</date>
    <millis>1507592380836</millis>
    <sequence>47325</sequence>
    <logger>job_5040ba24-ee41-4318-8650-f40005c84473</logger>
    <level>INFO</level>
    <class>omd.domain.s8.algorithms.TripAlgorithm</class>
    <method>logExecution</method>
    <thread>40</thread>
    <message>Executing FillTrip for 10000021 on Mon Oct 09 01:39:37 CEST 2017</message>
  </record>
  <record>
    <date>2017-10-10T01:39:41</date>
    <millis>1507592381115</millis>
    <sequence>47326</sequence>
    <logger>job_5040ba24-ee41-4318-8650-f40005c84473</logger>
    <level>INFO</level>
    <class>omd.domain.s8.algorithms.TripAlgorithm</class>
    <method>logExecution</method>
    <thread>40</thread>
    <message>Executing FillTrip for 10000024 on Mon Oct 09 01:39:37 CEST 2017</message>
  </record>
  <record>
    <date>2017-10-10T01:40:11</date>
    <millis>1507592411727</millis>
    <sequence>47385</sequence>
    <logger>job_5040ba24-ee41-4318-8650-f40005c84473</logger>
    <level>INFO</level>
    <class>omd.domain.s8.beans.JobRunnerBean</class>
    <method>run</method>
    <thread>40</thread>
    <message>31 objects processed</message>
  </record>
  <record>
    <date>2017-10-10T01:40:11</date>
    <millis>1507592411727</millis>
    <sequence>47386</sequence>
    <logger>job_5040ba24-ee41-4318-8650-f40005c84473</logger>
    <level>INFO</level>
    <class>omd.domain.s8.beans.JobRunnerBean</class>
    <method>runJob</method>
    <thread>40</thread>
    <message>Job 353 terminated successfully.</message>
    </record>
  </log>
</Result>

results matching ""

    No results matching ""