What is wrong with the request?

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Answered

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?
Photo of Plinio

Plinio

  • 270 Points 250 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
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.
Photo of Plinio

Plinio

  • 270 Points 250 badge 2x thumb
I already did it for CLI and the error persists.

Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Meaning you were unsuccessful via the CLI?
Photo of Plinio

Plinio

  • 270 Points 250 badge 2x thumb
I can not actually edit the parameters field from source field. Do you know how to do this via CLI ?
Photo of Plinio

Plinio

  • 270 Points 250 badge 2x thumb
Yes, unsuccessful via the CLI.
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
:) 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.
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
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. 
Photo of Plinio

Plinio

  • 270 Points 250 badge 2x thumb
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.

Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
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.
Photo of Plinio

Plinio

  • 270 Points 250 badge 2x thumb
No, when I use the CLI it works. The problem is in the request using the Postman.

I'll call.
Photo of MichaelT

MichaelT, Official Rep

  • 1,992 Points 1k badge 2x thumb
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
Photo of Plinio

Plinio

  • 270 Points 250 badge 2x thumb
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!
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Fantastic, and thank you for posting the resolution!