Skip to main content

Simflofy Job Service

The Simflofy Job Service is a RESTful interface to manage Simflofy Jobs.

Job IDs

Job IDs can be found either using the statuslist endpoint, or by going to the View page for the job in the Simflofy Admin UI

Job Status List

GET /api/job/service/statuslist?jobGroup=<groupName>

Description:

  • Find status of all Jobs

Query Parameter:

jobGroup: Optional. Only jobs in the named grouped will be returned.

Example JSON Response:

{
"message": null,
"results": {
"endTime": "2017-03-21T07:33:17",
"startTime": "2017-03-21T07:33:15",
"time": "1s",
"status": "COMPLETED",
"jobName": "FS to Solr Dev",
"statusName": "Completed",
"canStartJob": true,
"canRestartJob": false,
"canPauseJob": false,
"canAbortJob": false,
"canResumeJob": false,
"failed": 0,
"canKillJob": false,
"removed": 0,
"perSec": "5.23",
"jobId": 1490097912706,
"read": 8,
"written": 8,
"skipped": 0,
"jobRunId": "1490097912706_1490099595872"
},
"success": true
}

Example With CURL

curl -u admin:admin "localhost:8081/simflofy-admin/api/job/service/statuslist" | json_pp`

Job Status

GET /api/job/service/{jobid}/status

Description:

  • Find status of a specific Job.

Path Parameters:

jobid: The id of the job

Example JSON Response:

    {
"message": null,
"results":
{
"endTime": "2017-03-21T07:33:17",
"startTime": "2017-03-21T07:33:15",
"time": "1s",
"status": "COMPLETED",
"jobName": "FS to Solr Dev",
"statusName": "Completed",
"canStartJob": true,
"canRestartJob": false,
"canPauseJob": false,
"canAbortJob": false,
"canResumeJob": false,
"failed": 0,
"canKillJob": false,
"removed": 0,
"perSec": "5.23",
"jobId": 1490097912706,
"read": 8,
"written": 8,
"skipped": 0,
"jobRunId": "1490097912706_1490099595872"
},
"success": true
}

Example With CURL

curl -u admin:admin "localhost:8081/simflofy-admin/api/job/service/1490097912706/status" | json_pp`

Start Job

GET /api/job/service/{jobid}/start

Description:

  • Start a Simflofy Job by its ID

Path Parameters:

jobid: The id of the job

Example JSON Response:

{
"message": "Job Started",
"success": true
}

Example With CURL

curl -u admin:admin "localhost:8081/simflofy-admin/api/job/service/1490097912706/start" | json_pp`

Abort Job

/api/job/service/{jobid}/abort

Description

  • Abort a Simflofy Job by its ID

Path Parameters:

jobid: The id of the job

Example JSON Response:

{
"message": "Job Aborted",
"success": true
}

Example With CURL

curl -u admin:admin "localhost:8081/simflofy-admin/api/job/service/1490097912706/abort" | json_pp`

Resume Job

GET /api/job/service/{jobid}/resume

Description

  • Resumes a job, skipping all documents that were already processed

Path Parameters:

jobid: The id of the job

Example JSON Response:

{
"message": "Job Resumed",
"success": true
}

Example With CURL

curl -u admin:admin "localhost:8081/simflofy-admin/api/job/service/1490097912706/resume" | json_pp`

Run Errors

GET /api/job/service/{jobid}/runerrors

Description

  • Attempts to rerun the documents which had errors during the previous run. Not available for all connectors

Path Parameters:

jobid: The id of the job

Example JSON Response:

{
"message": "Run Errors Started",
"success": true
}

Example With CURL

curl -u admin:admin "localhost:8081/simflofy-admin/api/job/service/1490097912706/runerrors" | json_pp`

Get Document Status

GET /job/service/{jobid}/recordstatus?docId=<docId>&recordType=<recordType>

Description

  • Retrieve the most recent audit for the supplied document

Path Parameters:

jobid: The id of the job

Query Parameters:

docId: The source id of document whose audit you're searching for

recordType: The record type of the status you wish to retrieve. This parameter can be the following:

  • p : Processed
  • r : Read
  • e : Error
  • d : Duplicate
  • s : Skipped

Example:

GET /api/job/service/1639681211393/recordstatus?docId=1639595599840&recordType=p

Returns

{
"success": true,
"results": "RecordProcessAction: [jobId=1639681211393, jobRunId=1639681211393_1639686611201, jobName=Teams Export, docUri=/Users/test/Utility/bfs/1639595599840.html, docId=1639595599840, docName=1639595599840.html, docType=cm:content, docHash=null, docPath=/, versionId=null, versionSeries=null, contentLength=294, createdDate=Thu Dec 16 15:30:22 EST 2021,contentType=text/html] ,[message=null, newId=/Users/test/Utility/bfs/1639595599840.html, docHash=, lastModified=Thu Dec 16 15:30:22 EST 2021"
}

Example With CURL

curl -u admin:admin "localhost:8081/simflofy-admin/api/job/service/1490097912706/recordstatus?docId=1639595599840&recordType=p" | json_pp`