Hi Nitin,
You can get the reference from the below command and use the same container reference for your dsource on the delete dsource command.
curl -X GET -k http://Delphix-Engine/resources/json/delphix/database/ \
-b ~/cookies.txt -H "Content-Type: application/json"
{"type":"ListResult","status":"OK","result":[{"type":"OracleDatabaseContainer","reference":"ORACLE_DB_CONTAINER-5",
"namespace":null,"name":"<Dsource_name>",......
Delete the dsource as per below.
curl -X POST -k http://Delphix-Engine/resources/json/delphix/database/ORACLE_DB_CONTAINER-5/delete \
-b ~/cookies.txt -H "Content-Type: application/json"
------------------------------
Thanks
Ramasubramanian Sankaran
------------------------------
Original Message:
Sent: 05-01-2022 11:49:17 PM
From: Nitin Gupta
Subject: Deleting dsource using API or CLI
Thanks Rama and Diego. I was able to achieve the results with DELETE API method. I tried the one you have shared but not sure what value should go as objectReference.
------------------------------
Nitin Gupta
Delphix Community Members
Original Message:
Sent: 04-29-2022 01:18:16 PM
From: Ramasubramanian Sankaran
Subject: Deleting dsource using API or CLI
Hi Nitin,
Below is the example for deleting the dsource from API .
curl -v -X POST -k --data @- http://<Delphix_eng>/resources/json/delphix/database/{ref}/delete -b ~/cookies.txt -c ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
"type": "database",
"objectReferences" : ["DBNAME"]
}
EOF
More details can be found in the below Documentation
https://docs.delphix.com/docs/developer-s-guide/web-services-api-guide/gui-api-mapping
------------------------------
Ramasubramanian Sankaran
Senior Principal
Delphix
Original Message:
Sent: 04-28-2022 05:39:20 PM
From: Nitin Gupta
Subject: Deleting dsource using API or CLI
Hi Diego,
Yes, thats exactly what I want to achieve.
Thanks
Regards,
Nitin Gupta
------------------------------
Nitin Gupta
Delphix Community Members
Original Message:
Sent: 04-28-2022 05:31:38 PM
From: Diego Loureda
Subject: Deleting dsource using API or CLI
Hello Nitin,
If I understand correctly, you want to replicate a dsource to a secondary engine and after that delete the dsource on the primary engine.
In order to do that you need to do first a failover of that replication profile and after that you will be able to delete it with a simple api call.
Let me know if this is what you want to do and I will provide you with the API call.
Thanks
diego
------------------------------
Diego Loureda
Director, Technical Services
Delphix
Original Message:
Sent: 04-28-2022 07:56:58 AM
From: Nitin Gupta
Subject: Deleting dsource using API or CLI
Dear user,
We have a use case to destroy dsource once the dsource replicated to another engine. Is it possible via API or CLI?
------------------------------
Nitin Gupta
Delphix Community Members
------------------------------