API/Python/Open-Source Solutions

Expand all | Collapse all

What is wrong with the request?

Jump to Best Answer

Adam Bowen02-19-2019 05:47:00 PM

Plinio -02-19-2019 06:10:00 PM

  • 1.  What is wrong with the request?

    Posted 02-19-2019 05:04:00 PM

    I am using the Postman tool to make requests to Delphix in order to provision a VDB. However when sending the request an error occurs that I can not identify. The following is a step-by-step:


    1-
    ======================================================================
    Create Session
    https://{DE}/resources/json/delphix/session

    2-
    ======================================================================
    Login Delphix
    https://{DE}/resources/json/delphix/login

    Body Request:
    {
        "type": "LoginRequest",
        "username": "admin",
        "password": "****"
    }

    3-
    ======================================================================
    Provision VDB
    https://{DE}/resources/json/delphix/database/provision

    Body Request:
    {
        "container": {
            "sourcingPolicy": {
                "logsyncEnabled": false,
                "type": "SourcingPolicy"
            },
            "group": "GROUP-10",
            "name": "VSou_MGH",
            "type": "AppDataContainer"
        },
        "source": {
            "operations": {
                "configureClone": [],
                "preRefresh": [],
                "postRefresh": [],
                "preRollback": [],
                "postRollback": [],
                "preSnapshot": [],
                "postSnapshot": [],
                "preStart": [],
                "postStart": [],
                "preStop": [],
                "postStop": [],
                "type": "VirtualSourceOperations"
            },
            "parameters": {
                "postgresPort": 5438,
                "config_settings_stg": []
            },
            "additionalMountPoints": [],
            "allowAutoVDBRestartOnHostReboot": false,
            "logCollectionEnabled": false,
            "name": "VSou_MGH",
            "type": "AppDataVirtualSource"
        },
        "sourceConfig": {
            "path": "/mnt/provision/Source_6O1RXVSW",
            "name": "VSou_MGH",
            "repository": "APPDATA_REPOSITORY-176",
            "linkingEnabled": true,
            "environmentUser": "HOST_USER-153",
            "type": "AppDataDirectSourceConfig"
        },
        "timeflowPointParameters": {
            "snapshot": "APPDATA_SNAPSHOT-45",
            "type": "TimeflowPointSnapshot"
        },
        "masked": false,
        "type": "AppDataProvisionParameters"
    }

    Response Erro:
    {
        "type": "ErrorResult",
        "status": "ERROR",
        "error": {
            "type": "APIError",
            "details": "A server error occurred while processing your request.",
            "action": "Please contact Delphix support.",
            "id": null,
            "commandOutput": null
        }
    }

    =======================================================================

    What can it be?

    #QswithSolutions
    #Virtualization
    #DemoEnvironment


  • 2.  RE: What is wrong with the request?

    Posted 02-19-2019 05:08:00 PM
    Have you tried performing this operation via the delphix cli, yet? If you can do it successfully there, repeat the process but enter 'setopt trace=true' before entering commit. That will post the json that enters the request, and you can compare that to your entry in postman.


  • 3.  RE: What is wrong with the request?

    Posted 02-19-2019 05:45:00 PM
    I already did it for CLI and the error persists.



  • 4.  RE: What is wrong with the request?

    Posted 02-19-2019 05:47:00 PM
    Meaning you were unsuccessful via the CLI?


  • 5.  RE: What is wrong with the request?

    Posted 02-19-2019 06:10:00 PM
    Yes, unsuccessful via the CLI.


  • 6.  RE: What is wrong with the request?

    Posted 02-19-2019 06:15:00 PM
    :) Ok, well we should start by getting it working there, then. Go into the admin console and download a support bundle. Look in the error.log for this failure to see if it provides more clues.


  • 7.  RE: What is wrong with the request?

    Posted 02-19-2019 06:22:00 PM
    I can not actually edit the parameters field from source field. Do you know how to do this via CLI ?


  • 8.  RE: What is wrong with the request?

    Posted 02-19-2019 06:30:00 PM
    you could also get to the heart of the matter quickly by calling support and having them parse the logs and tell you the issue. 


  • 9.  RE: What is wrong with the request?

    Posted 02-20-2019 01:33:00 PM
    I understood the reason for the error. when I make a request via Postman there is a server error (Status Code 500), now I need to understand the reason.   
    Anyway, I appreciate the help! I'll keep looking for the reason.



  • 10.  RE: What is wrong with the request?

    Posted 02-20-2019 01:53:00 PM
    But, I thought you said it failed when you used the delphix CLI, as well? I would just call support and they can tell you why the Delphix Engine is returning 500.


  • 11.  RE: What is wrong with the request?

    Posted 02-20-2019 02:01:00 PM
    No, when I use the CLI it works. The problem is in the request using the Postman.

    I'll call.


  • 12.  RE: What is wrong with the request?

    Posted 02-20-2019 02:06:00 PM
    Hi Plinio,
    When you get an answer, would you please post it back here to the community. This type of information will be good for all our members to have when troubleshooting. 

    I really appreciate it. Good luck with our engineers. I know they will get you sorted. 

    And, thank you for your engagement and patience,
    Michael


  • 13.  RE: What is wrong with the request?
    Best Answer

    Posted 02-21-2019 01:39:00 PM
    I found the mistake!

     With the help of Rafael Borges, Technical Manager at Delphix Brazil, we discovered that the error was in the session request. After correcting the request it was successful to provision the VDB via API.

    Corretion:

    1-
    ======================================================================
    Create Session
    https://{DE}/resources/json/delphix/session

    Body Request:
    {
        "type": "APISession",
        "version": {
            "type": "APIVersion",
            "major": 1,
            "minor": 10,
            "micro": 2
        }
    }

    2-
    ...

    Thanks to all who helped!


  • 14.  RE: What is wrong with the request?

    Posted 02-21-2019 01:51:00 PM
    Fantastic, and thank you for posting the resolution!