CAP: Consume External Service - Part 1
Builds a CAP Node.js service from scratch that consumes the public NorthWind OData V4 service: cds import turns its EDMX metadata into a CSN model under srv/external, and a CatalogService projects Products from it with a custom READ handler that runs the request through cds.connect.to('NorthWind'). Shows the same projection working two ways — against a CSV mocked under srv/external/data with the <service>-<entity>.csv naming the framework expects, then against the real service once credentials.url is added to the CAP configuration and @sap-cloud-sdk/http-client@sap-cloud-sdk/http-clientThe HTTP client that carries a destination's credentials, so an outbound call inherits the authentication rather than assembling it.sap official, cap is installed — and defers routing that connection through the Cloud Foundry DestinationsDestinationsReaching a system that is not yours — an S/4HANA tenant, an on-premise service, a third-party API — without the address, the credentials or the tunnel being written into the application. The destination is the indirection, and the reason an endpoint can move without a redeploy.SAP and community, unassessed service to the next post in the series.
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1, wrote 3@jcailanauthor
In this series
- 1CAP: Consume External Service - Part 1you are here
- 2CAP: Consume External Service – Part 2 ↗Not read yet
- 3
Before you read it
ApplicabilityCore changedSeed data changed in @sap/cds-dk 7.9.1, 2024-05-02.
This is a derived prompt to re-check the work, not a claim that the work is wrong. Exact stale statements are recorded separately after editorial review.
Properties
About this work
For seed-data
Building onedevatlas: the idea, the back-and-forth with AI, the wrong turns, and an orb who lost his permanent spot in the atlas.
Details
Graph
Source
History
- explains → applies_to on capability:seed-data (cap)Door scope proposed from the title and summary, so a door page lists the piece only where it holds (docs/concepts/content-on-doors.md).
- Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
- Ref
content:cap-consume-external-service-part-1- JSON
- /content/cap-consume-external-service-part-1.json
- MCP
- Connecting an agent