Rest API 5.0

Job Services

This API is completely related to the jobs. Available API's under Job Services are:

  • Get Advance Job

  • Get Job Status

  • Run Advance Job 

  • Update Advance Job 

  • Change Status

  • Get Job Details

  • GetJobStepStatus

1. Get Advance Job

This API is used to get the advance job details using Id. 

Mandatory Field: advancejobid.

Method

URL

Parameter

getAdvanceJob

api/job/getAdvanceJob?advancejobid={advancejobid}

advancejobid={advancejobid}

Response Body 



 "status": true, 

 "statusCode": "", 

 "statusMsg": "", 

 "response": { 

 "Details": { 

 "advancejobid": 1000, 

 "ajname": "Load table catalog from dictionary", 

 "ajtype": "LOADCATALOG", 

 "classname": "com.ovaledge.oasis.advance.LoadTblCatalogImpl", 

 "help": "This job would load catalog from the staging table stg_catalog. Move your data dictionary into this  table and then run this job.", 

 "attr1": "false", 

 "attr2": "false", 

 "attr3": "false", 

 "attr4": "true", 

 "attr5": "", 

 "attr1label": "Update Title(true/false)", 

 "attr2label": "Update Business description(true/false)", 

 "attr3label": "Update Technical description(true/false)", 

 "attr4label": "Create Missing Tags(true/false)", 

 "attr5label": "Attr5" 

 } 

 } 

}

2. Get Job Status

There are some APIs that return Job Id as a response to get the status of the jobs using this Job Id.

Example

  1. Schema API --> crawlExistingSchema, crawlNewSchema
  2. Lineage API --> triggerLineageCreationForDashboard

Using the Job Id received as part of the response, we get the job status by calling getJobStatus API.

It requires a job id as input and returns job status.

Mandatory Field: jobId.

Method URL Parameter
getJobStatus  /api/job/getJobStatus/{jobId} {jobId}

Response

{

  "status": true,

  "statusCode": "lineage with id 1002 is deleted",

  "statusMsg": "",

  "response": {

“Status”: “SUCCESS”

}

}

3. Run Advance Job 

 This API is used to run the Advance job using advance Job Id. 

Mandatory Field: advancejobid.

Method

URL

Parameter

runAdvanceJob

 api/job/runAdvanceJob?advancejobid={advancejobid}

advancejobid={advancejobid}

Response Body



 "status": true, 

 "statusCode": "", 

 "statusMsg": "", 

 "response": { 

 "Advance Job Sucessfully submitted with Job Id": 1077  } 



advancejobid={advancejobid}

4. Update Advance Job 

This API is used to update the Advance job parameters using advance job id. 

Mandatory Field: advancejobid.

Method

Url

Parameter

updateAdvanceJob

api/job/updateAdvanceJob?advancejobid={advancejobid}&attr1={attr1}&attr2={attr2}&attr3={attr3}&attr4={attr4}&attr5={attr5}

updateAdvanceJob ={advancejobid}&attr1={attr1}&attr2={attr2}&attr3={attr3}&attr4={attr4}&attr5={attr5}

Response Body 



 "status": true, 

 "statusCode": "", 

 "statusMsg": "", 

 "response": { 

 "job": { 

 "advancejobid": 1000, 

 "ajname": "Load table catalog from dictionary", 

 "ajtype": "LOADCATALOG", 

 "classname": "com.ovaledge.oasis.advance.LoadTblCatalogImpl", 

 "help": "This job would load catalog from the staging table stg_catalog. Move your data dictionary into this  table and then run this job.", 

 "attr1": "false", 

 "attr2": "false", 

 "attr3": "true", 

 "attr4": "false", 

 "attr5": null, 

 "attr1label": "Update Title(true/false)", 

 "attr2label": "Update Business description(true/false)", 

 "attr3label": "Update Technical description(true/false)", 

 "attr4label": "Create Missing Tags(true/false)", 

 "attr5label": "Attr5" 

 } 

 } 

}

5. Change Status

This API is to change the status of a job like how we do in the application jobs page

As part of this API, you can perform the following actions

  1. Initialize: We can use (INIT) to initialize any job by giving multiple job id’s.
  2. Killing: We can use (KILLING) to kill any job by providing job id’s.
  3. Hold: We can use (HOLD) to hold a job.

Mandatory Field: jobStepIdList, status.

Method Name

URL

Parameters

changeStatus

/api/changeStatus

 

Mandatory Fields

  • jobStepIdList: Allowed values are integers
  • Status: Allowed values are (INIT/KILLING/HOLD)

Request Body

{

  "jobStepIdList": [

    150,151

  ],

  "status": "init"

}

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "status": {

      "150": "Success",

      "151": "Success"

    }

  }

}

Request Body

{

  "jobStepIdList": [

    152

  ],

  "status": "initi"

}

Response Body

{

  "status": false,

  "statusCode": "",

  "statusMsg": "Valid [Status] can be INIT/KILLING/HOLD .",

  "response": {}

}

Request Body

{

  "jobStepIdList": [

    152,123234

  ],

  "status": "integer"

}

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "status": {

      "152": "Success",

      "123234": "No job is present with this jobStepId"

    }

  }

}

Request Body

{

  "jobStepIdList": [

],

  "status": "init"

}

Response Body

{

  "status": false,

  "statusCode": "",

  "statusMsg": "[jobStepIdList] cannot be empty.",

  "response": {}

}

6. Get Job Details

This API is to get job details of a job will give us jobs that we need with help of the following parameters

  • endingTimeStamp: This takes the date from the user and gives output till the date what jobs are done by the user.
  • startingTimeStamp: This takes the date from the user and gives an output from the date what jobs are done by the user.
  • statusList: This takes a list of status from a user like SUCCESS /PARTIAL SUCCESS / ERROR by which the user can get what status he required.

Method Name

URL

Parameters

getJobDetails

/api/job/getJobDetails

EndDate,StartDate,StatusList

Mandatory Fields

  • EndingTimeStamp: Allowed format is (YYYY-MM-DD)

  • StartingTimeStamp: Allowed format is (YYYY-MM-DD)

  • StatusList: Allowed values are (SUCCESS/PARTIAL SUCCESS,ERROR)

Request Body

{

  "endDate":”” ,

  "startDate": “”,

  "statusList": [

]

}

Response Body

 {

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "Job Details": [

      {

        "status": "SUCCESS",

        "jobId": 1000,

        "userid": "admin",

        "jobstepid": 1000,

        "jobstepname": "Crawling for schema : sqlser.Person",

        "createdate": "2021-12-31 06:19:33.0"

      },

      {

        "status": "SUCCESS",

        "jobId": 1000,

        "userid": "admin",

        "jobstepid": 1001,

        "jobstepname": "Profiling for schema : sqlser.Person",

        "createdate": "2021-12-31 06:19:33.0"

      },

      {

        "status": "SUCCESS",

        "jobId": 1001,

        "userid": "admin",

        "jobstepid": 1002,

        "jobstepname": "Archiving Audit Tables",

        "createdate": "2022-01-01 02:00:02.0"

      },

      {

        "status": "SUCCESS",

        "jobId": 1002,

        "userid": "admin",

        "jobstepid": 1003,

        "jobstepname": "Crawling for schema : sqlser.Production",

        "createdate": "2022-01-01 13:00:00.0"

      },

      {

        "status": "SUCCESS",

        "jobId": 1003,

        "userid": "admin",

        "jobstepid": 1004,

        "jobstepname": "Archiving Audit Tables",

        "createdate": "2022-01-02 02:00:02.0"

      },

      {

        "status": "SUCCESS",

        "jobId": 1004,

        "userid": "admin",

        "jobstepid": 1005,

        "jobstepname": "Archiving Audit Tables",

        "createdate": "2022-01-03 05:27:05.0"

      },

      {

        "status": "SUCCESS",

        "jobId": 1005,

        "userid": "admin",

        "jobstepid": 1006,

        "jobstepname": "Crawling for schema : mysql.ovaledgedb",

        "createdate": "2022-01-03 09:50:51.0"

      }

    ]

  }

}

Request Body

{

  "endDate":”2021-11-10” ,

  "startDate": “2021-11-01”,

  "statusList": [

“success”

]

}

Response Body

{

  "status": false,

  "statusCode": "",

  "statusMsg": "Invalid [endingTimeStamp] format , it should be 'yyyy-mm-dd hh:mm:ss'",

  "response": {}

}

Request Body

{

  "endDate":”2021-11-10 10:10:11” ,

  "startDate": “2021-11-01 09:10:12”,

  "statusList": [

“suess”

]

}

Response Body

{

  "status": false,

  "statusCode": "",

  "statusMsg": "InvalidStatus : 'sucss'. Valid status are :ERROR, SUCCESS, PARTIAL SUCCESS, KILLING, KILLED, HOLD",

  "response": {}

}

Request Body

{

  "endDate":”” ,

  "startDate": “2022-01-01 10:10:11”,

  "statusList": [

“partial success”

]

}

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "Job Details": [

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1018,

        "userid": "mounika.anumukonda@ovaledge.com",

        "jobstepid": 1021,

        "jobstepname": "Crawl users, roles and permissions : 1003",

        "createdate": "2022-01-03 10:28:32.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1292,

        "userid": "admin",

        "jobstepid": 1303,

        "jobstepname": "Crawling for schema : sqlser.HumanResources",

        "createdate": "2022-01-10 08:46:41.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1293,

        "userid": "admin",

        "jobstepid": 1304,

        "jobstepname": "Crawling for schema : mysql.ovaledgedb51",

        "createdate": "2022-01-10 09:16:00.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1294,

        "userid": "admin",

        "jobstepid": 1305,

        "jobstepname": "Crawling for schema : mysql.ovaledgedb51",

        "createdate": "2022-01-10 10:16:00.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1295,

        "userid": "admin",

        "jobstepid": 1306,

        "jobstepname": "Crawling for schema : mysql.ovaledgedb51",

        "createdate": "2022-01-10 11:16:00.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1296,

        "userid": "madhu",

        "jobstepid": 1307,

        "jobstepname": "Crawling for schema : HiveKerberos-M.default",

        "createdate": "2022-01-10 11:23:54.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1297,

        "userid": "madhu",

        "jobstepid": 1308,

        "jobstepname": "Crawling for schema : HiveKerberos-M.dg_work",

        "createdate": "2022-01-10 11:23:54.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1299,

        "userid": "madhu",

        "jobstepid": 1310,

        "jobstepname": "Crawling for schema : HiveKerberos-M.ovaledge",

        "createdate": "2022-01-10 11:23:54.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1320,

        "userid": "admin",

        "jobstepid": 1331,

        "jobstepname": "Crawling for schema : mysql.ovaledgedb51",

        "createdate": "2022-01-10 12:16:00.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1321,

        "userid": "madhu",

        "jobstepid": 1332,

        "jobstepname": "Crawling for schema : HiveKerberos-M.default",

        "createdate": "2022-01-10 12:21:18.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1322,

        "userid": "madhu",

        "jobstepid": 1333,

        "jobstepname": "Crawling for schema : HiveKerberos-M.dg_work",

        "createdate": "2022-01-10 12:21:18.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1324,

        "userid": "madhu",

        "jobstepid": 1335,

        "jobstepname": "Crawling for schema : HiveKerberos-M.ovaledge",

        "createdate": "2022-01-10 12:21:18.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1327,

        "userid": "madhu",

        "jobstepid": 1338,

        "jobstepname": "Crawling for schema : HiveKerberos-M66.default",

        "createdate": "2022-01-10 12:26:24.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1328,

        "userid": "madhu",

        "jobstepid": 1339,

        "jobstepname": "Crawling for schema : HiveKerberos-M66.dg_work",

        "createdate": "2022-01-10 12:26:24.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1330,

        "userid": "madhu",

        "jobstepid": 1341,

        "jobstepname": "Crawling for schema : HiveKerberos-M66.ovaledge",

        "createdate": "2022-01-10 12:26:24.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1339,

        "userid": "madhu",

        "jobstepid": 1350,

        "jobstepname": "Crawling for schema : Mysql-Local.information_schema",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1340,

        "userid": "madhu",

        "jobstepid": 1351,

        "jobstepname": "Crawling for schema : Mysql-Local.BankerDatabse",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1341,

        "userid": "madhu",

        "jobstepid": 1352,

        "jobstepname": "Crawling for schema : Mysql-Local.CUSTOMERORDER",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1342,

        "userid": "madhu",

        "jobstepid": 1353,

        "jobstepname": "Crawling for schema : Mysql-Local.bitnami_suitecrm",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1343,

        "userid": "madhu",

        "jobstepid": 1354,

        "jobstepname": "Crawling for schema : Mysql-Local.looker_tmp",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1344,

        "userid": "madhu",

        "jobstepid": 1355,

        "jobstepname": "Crawling for schema : Mysql-Local.microstrategy",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1345,

        "userid": "madhu",

        "jobstepid": 1356,

        "jobstepname": "Crawling for schema : Mysql-Local.ovaledgedb",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1346,

        "userid": "madhu",

        "jobstepid": 1357,

        "jobstepname": "Crawling for schema : Mysql-Local.ovaledgedb51",

        "createdate": "2022-01-10 12:47:12.0"

      },

      {

        "status": "PARTIAL SUCCESS",

        "jobId": 1347,

        "userid": "madhu",

        "jobstepid": 1358,

        "jobstepname": "Crawling for schema : Mysql-Local.sakila",

        "createdate": "2022-01-10 12:47:12.0"

      }

   ]

  }

}

7. GetJobStepStatus

This API is to check the status of a job

Mandatory Field: jobStepId.

Method Name

URL

Parameters

getjobStepStatus

/api/job/getJobStepStatus/{jobStepId}

jobStepId

Mandatory Fields: 

  • jobStepId: Allowed values are integers

Request Body

{

  "jobStepId": 1

}

Response Body

{

  "status": false,

  "statusCode": "",

  "statusMsg": "No job found with jobId 1",

  "response": {}

}

Request Body

{

  "jobStepId": 0

}

Response Body

{

  "status": false,

  "statusCode": "",

  "statusMsg": "jobId should not be blank or zero",

  "response": {}

}

Request Body

{

  "jobStepId": 1231

}

Response Body

{

  "status": true,

  "statusCode": "",

  "statusMsg": "",

  "response": {

    "Status": "SUCCESS"

  }

}