cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BTP Destination creation using REST endpoints/CLI

3,105

Hello,

I am familiar with creating SCP CF Destinations by filling some parameters in BTP Cockpit UI. However, our requirement is to create this destination through pipelines (Like a separate stage in CI/CD). We are neither able to find any REST endpoints nor any CLI commands that SAP provides that will fulfil this purpose.

Has anyone already tried this or is it really possible ?

Any help would be really appreciated on this.

Thank you!!

Accepted Solutions (0)

Answers (4)

Answers (4)

gregorw
SAP Mentor
SAP Mentor

I would suggest that you checkout what you can do using a mta.yaml. I have an example which creates the destinations required for the HTML5 repository access:

https://github.com/gregorwolf/cap-websockets/blob/main/mta.yaml#L71

Check also this issue Example: SAP CP Destinations #39 in the CF MTA Example repository.

mig1
Participant

Successfully tried it out!

cf create-service 'destination' 'lite' 'destination-instance-1' -c 'config.json' --wait  

--or--

cf update-service 'destination-instance-1' -c 'config.json' --wait

config.json  

{ "HTML5Runtime_enabled" : "false", "init_data" : { "instance" : { "existing_destinations_policy": "update", "destinations" : [ { "Authentication": "NoAuthentication", "Name": "UI5", "ProxyType": "Internet", "Type": "HTTP", "URL": "https://ui5.sap.com" }, { "Authentication": "BasicAuthentication", "Name": "sap-ecc", "Description": "sap-ecc", "ProxyType": "OnPremise", "Type": "HTTP", "URL": "http://sap-ecc.local:80", "CloudConnectorLocationId": "CITRIX_VM", "User": "RFCPMMOBIXXX", "Password": "**********" } ] } } }
dr_vup
Contributor
0 Likes

Really cool! Thanks for sharing

CarlosRoggan
Product and Topic Expert
Product and Topic Expert

Hi Anu

1) Similar to other services, you can create a service instance of destination service with provided JSON-parameter-file.
In this file you can pass your destination configurations.
To learn about the file format, you can just export an existing destination configuration to file system

2) To use the REST API, you can have a look at the docu and the REST API reference

Does this help?

Kind Regards,

Carlos

mig1
Participant
0 Likes

Haven't tried it yet, but I am about to. Should be possible via CLI?

cf create-service destination lite 'my-destination-service-1' -c config.json

See https://help.sap.com/docs/CP_CONNECTIVITY/cca91383641e40ffbe03bdc78f00f681/6816d3caeb464f8d8b0d1b5ad... for info about the config.json parameter options.