Hi Luke,
Yes i am passing container name and running after creating session and authentication, the problem is it is not taking the force option and everytime it is following the normal delete option.
Below is the syntax which i am using for sybase DB.
curl -s -X POST -k --data @-
http://${DE}/resources/json/delphix/database/${database}/delete \
-b cookies.txt -H "Content-Type: application/json" <<-EOF
{
"type": "DeleteParameters",
"deleteParameters": {
"type": "DeleteParameters",
"force": "true"
}
}
EOF
Also i even tried with but not working, i tried almost all sort of combinations
{
"type": "DeleteParameters",
"force": "true"
}
------------------------------
Abhinav Chandra
Team Leader
Accenture
------------------------------
Original Message:
Sent: 07-23-2020 03:17:59 AM
From: Luke Moss
Subject: API script to force delete SAP ASE VDB
Hello Abhinav,
To determine the input parameters for a force delete operation you can use 'setopt trace=true'.
For example: (NOTE - this is for an Oracle VDB and not SAP ASE)
luke-5370 database 'CLI_VDB' delete *> set
credential force type username
luke-5370 database 'CLI_VDB' delete *> set force=
false true
luke-5370 database 'CLI_VDB' delete *> set force=true
luke-5370 database 'CLI_VDB' delete *> setopt trace=true
luke-5370 database 'CLI_VDB' delete *> commit
=== POST /resources/json/delphix/database/ORACLE_DB_CONTAINER-39/delete ===
{
"type": "OracleDeleteParameters",
"force": true
}
If you then wish to use these parameters in your curl statement you can do so as follows:
curl -s -X POST -k --data @- http://<Engine>/resources/json/delphix/database/ORACLE_DB_CONTAINER-XX/delete \
-b ~/cookies.txt -c ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
"type": "OracleDeleteParameters",
"force": true
}
EOF
Please note, you need to use the VDB reference property (CONTAINER-XX) and not the name (TEST_VDB) so good practice would be to include code in your script to map the name to the reference.
You will also need to authenticate first.
I hope this is helpful.
------------------------------
Luke Moss
Delphix Support
Delphix
Original Message:
Sent: 07-22-2020 05:31:21 PM
From: Abhinav Chandra
Subject: API script to force delete SAP ASE VDB
Hi,
How to use the force option in API script for Delete SAP ASE VDB?
{
"type": "DeleteParamaters",
"force": "true"
}
------------------------------
Abhinav Chandra
Team Leader
Accenture
------------------------------