I just run from java code, I did not save the jobID for my test . How could I get my jobID on (REST

I just run from java code, I did not save the jobID for my test . How could I get my jobID on (REST API) from the portal or from my code?

Answers

  • @Manigandan.R,

    Please see TRTH REST tutorials on the portal, either naked REST or Java.

    They illustrate a 3-step you would need too:

    1.Submit you request, receive a job ID.

    2a.If the status retuned is 200, proceed to retrieve the result.

    2b.if status is 202 keep checking untill it's 200, proceed to retrieve the result

    3. Retrieve the result by ID.

  • zoya.farberov

    Thanks for your reply. client have tried to pull the historical RIC (expired RIC) with the appropriate Start and End date on REST API but receives the error message as Not found. Clients comments below -

    I know this stock expired at 14-Mar-15 but why when I select QueryStartDate 2006-01-01T00:00:00.000 and QueryEndDate is 2017-04-26T23:59:59.999Z, it still show {"Identifier":"PETM.OQ","Error":"Not found","IdentifierType":"Ric"}

  • @Manigandan.R ,

    I think you are looking run HistoricalSearch request. Please see the example

    in REST API Tutorials?

  • @Manigandan.R
    "

    Since the RIC has already been expired, the client needs to add the

    "AllowHistoricalInstruments": true as ValidationOptions in the on-demand request. Below is the sample.

    "IdentifierList": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
    "InstrumentIdentifiers": [
    {
    "Identifier": "PETM.OQ",
    "IdentifierType": "Ric"
    }
    ],
    "ValidationOptions": {
    "AllowHistoricalInstruments": true
    }
    ,
    "UseUserPreferencesForValidationOptions": false
    }

    For more info, please see this question.

  • @Manigandan.R

    You can query all jobs via GET /Jobs/Jobs endpoint or only active jobs via /Jobs/JobGetActive endpoint.

    For usage example, please see the example in this Key Mechanisms page; Example Scenario: "Get Active Jobs and Monitor" and "Get Completed Jobs".