{"ref":"content:sap-cap-adapter-to-expose-odata-as-custom-rest-service","page":"/content/sap-cap-adapter-to-expose-odata-as-custom-rest-service","json":"/content/sap-cap-adapter-to-expose-odata-as-custom-rest-service.json","generated":"2026-11-15","drafted_with_ai":true,"entity":{"id":"sap-cap-adapter-to-expose-odata-as-custom-rest-service","title":"SAP CAP Adapter to expose OData as custom REST Service","url":"https://community.sap.com/t5/technology-blog-posts-by-sap/sap-cap-adapter-to-expose-odata-as-custom-rest-service/ba-p/13497591","content_type":"blog","published_on":"source:sap-community","explains":[{"ref":"capability:odata","applies_to":{"ecosystems":["cap"]}},{"ref":"capability:data-modelling","applies_to":{"ecosystems":["cap"]}},"capability:service-integration"],"summary":"Walks through consuming an external OData V2 service in a CAP project — `cds import` converts the Northwind service's EDMX into a CSN and `cds.connect.to` wires up the remote proxy — then re-exposing it as plain REST with the `@protocol:'rest'` annotation instead of [OData](capability:odata)'s own envelope. Shows two ways to reshape the response, renaming and dropping fields in a CDS projection or rewriting the returned objects in a custom service handler, and remaps `?pageSize` and `?offset` onto OData's `$top` and `$skip` in that same handler.","short":"Re-exposing an imported OData V2 service as REST in CAP","author":"Former Member","published":"2021-09-15","provenance":{"discovered_via":[{"source":"source:sap-community","channel":"cap-tag"}],"first_seen":"2026-09-28"},"drafted_with_ai":true,"history":[{"date":"2026-10-17","field":"explains","from":null,"to":"applies_to on capability:odata (cap); capability:data-modelling (cap)","reason":"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)."}]},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"poor","evidence":"published 62 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"poor","evidence":"@cap-js-community/odata-v2-adapter 1.10.0, 2023-04 and 3 more"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":9231,"unit":"views"},{"value":5,"unit":"comments"},{"value":9,"unit":"likes"}]},"signals":{"views":9231,"likes":9,"comments":5,"metrics_at":"2026-11-01"},"series":null,"edges":{"authors":[]}}