Destinations
Destinations are used for outbound communication to a remote resource and contain the required connection information. They are represented by symbolic names that are used by the cloud application to refer to a remote connection. When a card is using SAP BTP destinations, those are configured in the manifest. Inside the manifest, the card developer indicates the name of the destination and the URL that depends on this destination.
Inside the host environment, the host application developer creates a method that resolves a given destination name to an absolute URL. This happens with the help of the sap.ui.integration.Host element.
For more information of SAP Business Technology Platform destinations, check our Create a Northwind Destination example.
In the manifest
In section configuration
, sub section destinations
of the card, the card
developer can describe the destinations on which the card depends. Those described destinations can be
referred inside a data request description with a placeholder like this:
{{destinations.myDestinationKey}}
. See the example below.
Destination properties
Property | Type | Required | Default | Description | Schema Version | Since |
---|---|---|---|---|---|---|
name | string | Yes | The name of the destination. This should be the same name that is used in the SAP Cloud Platform. The host environment is responsible to resolve that name to a URL. | 1.20.0 | 1.76 | |
defaultUrl | string | No | Default url for the destination. If the destination can not be resolved by the host, this url will be used. | 1.21.0 | 1.77 |
Note: If you are developing a Component Card please check the Component Card sample.
In the host environment
For detailed information about the contribution from host environment, see Integrate Destinations.
Example
An example with a card which fetches data from Northwind service:
"sap.card": { "type": "Table", "data": { "request": { "url": "{{destinations.myDestination}}/Orders", "parameters": { "$format": "json", "$top": "{parameters>/maxItems/value}", "$orderby": "Freight desc" } } }, "configuration": { "destinations": { "myDestination": { "name": "Northwind" } }, "parameters": { "maxItems": { "value": 7, "type": "integer" } } }, "content": { "data": { "path": "/value/" }, "maxItems": "{parameters>/maxItems/value}", "row": { "columns": [{ "title": "Customer", "value": "{ShipName}" }, { "title": "Country", "value": "{ShipCountry}" }, { "title": "Freight", "value": "{Freight}" } ] } } }Try it Out