How to know if a dSource or VDB is active using API?

  • 0
  • 1
  • Question
  • Updated 11 months ago
  • Answered
I am using this API to fetch dSource list. It is returning inactive VDBs also.
Photo of anshul gupta

anshul gupta

  • 466 Points 250 badge 2x thumb

Posted 11 months ago

  • 0
  • 1
Photo of Abdullah Mourad

Abdullah Mourad

  • 60 Points
Hey Anshul,

Unfortunately, at this time there is no single API call that will do this for you. It would require a bit of post processing. You would need to get the list of sources (resources/json/delphix/source). Once you have the list of sources you can look at the "runtime" object, which has a property called "status".

Below is an example of retrieving a specific source with the response. I have substituted large, unrelated chunks from the response with "..." to make it more convenient to read.

GET /resources/json/delphix/source/ORACLE_LINKED_SOURCE-1
    "type": "OKResult",
    "status": "OK",
    "result": {
        "type": "OracleLinkedSource",
        "reference": "ORACLE_LINKED_SOURCE-1",
        "runtime": {
            "type": "OracleSourceRuntime",
            "status": "RUNNING",    <------------------
    "job": null,
    "action": null

You could write a script that gets all sources, parses the output and filters. A command line json processor like jq ( can be pretty handy, but of course this can also be done in many other ways.

Hope that helps!