How to differentiate between a VDB and a dSource while using the List Databases API ?

  • 0
  • 1
  • Question
  • Updated 10 months ago
  • Answered
I am using the List Databases API 
$ curl -X GET -k http://delphix-server/resources/json/... \
    -b ~/cookies.txt -H "Content-Type: application/json"

I get the JSON output. I could not find a reference to a key/value pair to differentiate between a VDB and a dSource. Is there some differentiating factor to recognize if it is a VDB or dSource through the JSON output which is obtained?
Photo of Shamanth Hanchate

Shamanth Hanchate

  • 210 Points 100 badge 2x thumb

Posted 10 months ago

  • 0
  • 1
Photo of Neal Stack

Neal Stack, Official Rep

  • 2,392 Points 2k badge 2x thumb
Official Response
Hello,

I think you would want to use the "source" API (http://nstack516.dcenter.delphix.com/api/#source).

This has a column named "virtual" that shows "true" for VDBs or "false" for dSources:

nstack516.dcenter> setopt trace=true
nstack516.dcenter> /source list
=== GET /resources/json/delphix/source ===
=== RESPONSE ===
{
    "type": "ListResult",
    "status": "OK",
    "result": [
        {
            "type": "MSSqlLinkedSource",
            "reference": "MSSQL_LINKED_SOURCE-5",
            "namespace": null,
            "name": "Vail",
            "description": null,
            "linked": true,
            "virtual": false,
            "restoration": false,
            "staging": false,
            "container": "MSSQL_DB_CONTAINER-53",
            "config": "MSSQL_SINGLE_CONFIG-26",
            "status": "DEFAULT",
            "runtime": {
                "type": "MSSqlSourceRuntime",
                "status": "RUNNING",
                "accessible": true,
                "databaseSize": 3145728,
                "notAccessibleReason": null,
                "enabled": "ENABLED"
            },
            "externalFilePath": null,
            "operations": {
                "type": "LinkedSourceOperations",
                "preSync": [],
                "postSync": []
            },
            "sharedBackupLocation": "\\\\10-43-5-117\\SQLBackups\\PRDCH3BAZSQLCLU$BAZSQL_AG\\Bazooka",
            "backupLocationUser": null,
            "backupLocationCredentials": null,
            "stagingSource": "MSSQL_STAGING_SOURCE-5",
            "encryptionKey": "",
            "validatedSyncMode": "FULL_OR_DIFFERENTIAL"
        }
...etc...