[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Updated: (ODATA-398) Define canonical function as a path segment that allows retrieving an entity by its id
[ http://tools.oasis-open.org/issues/browse/ODATA-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralf Handl updated ODATA-398:
-----------------------------
Proposal:
Define a $entity path segment which can be appended to the service root to specify an individual resource.
GET ~myservice/$entity?$id=...
This path segment can be followed by a cast segment and combined with other query options that are applicable for resource paths identifying a single entity:
GET ~myservice/$entity/Northwind.Customer?$id=http://myservice/Customers('ALFKI')
&$select=CompanyName,ContactName&$expand=Orders
This is functionally equivalent to a key-lookup for that resource. The metadata URL and payload are identical to a request addressing the same entity via its read URL.
was:
Define a $entity path segment which can be appended to the service root to specify an individual resource.
GET ~myservice/$entity?$id=...
Can be followed by a cast segment and combined with other query options;
GET ~myservice/$entity/Northwind.Customer?$id=http://myservice/Customers('ALFKI')
&$select=CompanyName,ContactName&$expand=Orders
> Define canonical function as a path segment that allows retrieving an entity by its id
> --------------------------------------------------------------------------------------
>
> Key: ODATA-398
> URL: http://tools.oasis-open.org/issues/browse/ODATA-398
> Project: OASIS Open Data Protocol (OData) TC
> Issue Type: Improvement
> Components: OData ABNF Construction Rules, OData Protocol , OData URL Conventions
> Affects Versions: V4.0_CSD01
> Environment: [Proposed]
> Reporter: Michael Pizzo
> Fix For: V4.0_CSD02
>
>
> Ids are the primary way to reference an instance in OData; they are used in relationships, in deltas, and can take the place of instances in payloads. We recommend, but do not require that ids be dereferenceable.
> Clients need a dependable way to get from an id to a reference, whether or not the reference is dereferencable. Although they could construct a query if they know the root set the id comes from, it would be useful and more discoverable to introduce a canonical query function, at the service root, for returning an instance given its id.
> Note that, since the id is likely to contain illegal characters, we have to pass the id as a query option, and will need to double single quotes in reference
> Options:
> GET ~myservice/getbyid(@id)?@id='.....'
> GET ~myservice/$getbyid?@id='.....'
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]