OData Cheat Sheet (CAP): Unterschied zwischen den Versionen
Aus Matts Wiki
Matt (Diskussion | Beiträge) K Matt verschob die Seite OData Cheat Sheet nach OData Cheat Sheet (CAP), ohne dabei eine Weiterleitung anzulegen  | 
				Matt (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung  | 
				||
| Zeile 1: | Zeile 1: | ||
This article holds notes on how to quickly get certain responses from a OData   | This article holds notes on how to quickly get certain responses from a OData service, specifically from an SAP Cloud Application Programming Model (CAP) OData service.  | ||
Sources:   | |||
https://www.odata.org/getting-started/basic-tutorial/  | |||
== OData V4 ==  | == OData V4 ==  | ||
| Zeile 9: | Zeile 12: | ||
Returns the number of records retreived  | Returns the number of records retreived  | ||
== OData Service Request Contents ==  | |||
Below are contents of request ''req'' from actions listed  | |||
{| class="wikitable"  | |||
!Object  | |||
!Response  | |||
!Comment  | |||
|-  | |||
|req.target  | |||
|bookshop_Books  | |||
|returns req.target.name  | |||
|-  | |||
|req.params  | |||
|(1) ['3b1e1d9e-9563-4cd3-a448-69b8b8f1c384']  | |||
|returns an array of length 1  | |||
|-  | |||
|req.params[0]  | |||
|'3b1e1d9e-9563-4cd3-a448-69b8b8f1c384'  | |||
|returns first element of the params array  | |||
|}  | |||
[[Kategorie:Development]]  | [[Kategorie:Development]]  | ||
[[Kategorie:SAP]]  | |||
Version vom 13. Juli 2024, 13:23 Uhr
This article holds notes on how to quickly get certain responses from a OData service, specifically from an SAP Cloud Application Programming Model (CAP) OData service.
Sources:
https://www.odata.org/getting-started/basic-tutorial/
OData V4
Querying Data
GET serviceRoot/People?$count=true
Returns the number of records retreived
OData Service Request Contents
Below are contents of request req from actions listed
| Object | Response | Comment | 
|---|---|---|
| req.target | bookshop_Books | returns req.target.name | 
| req.params | (1) ['3b1e1d9e-9563-4cd3-a448-69b8b8f1c384'] | returns an array of length 1 | 
| req.params[0] | '3b1e1d9e-9563-4cd3-a448-69b8b8f1c384' | returns first element of the params array | 
