Pad zur Definition der d!sco Web API.
====================================================================
Prototyp Core:
Umsetzung mit http://www.asp.net/web-api
====================================================================
Folgende Links fand ich ganz hilfreich oder zumindest interessant:
http://microformats.org/wiki/rest/urls
http://stackoverflow.com/questions/1296421/rest-complex-applications
http://stackoverflow.com/questions/5020704/how-to-design-restful-search-filtering
Ohne jedoch OData zu kennen hatte ich bereits die folgenden Ideen für die d!sco Web API (DRAFT):
POST \disco\webapi\{entity}\
Creates a new {entity}. Values are given as application/x-disco-{entity} in
HTTP header.
GET \disco\webapi\{entity}\{id}
Retrives the {entity} given by {id}. Values are returned as
application/x-disco-{entity} in HTTP header.
GET
\disco\webapi\{entity}\?filter={id}[&sort={by},desc|asc][&paging={index},{count}]
Retrives all {entity} that matches the filter given by {id}. Values are
returned as application/x-disco-{entity}-collection in HTTP header.
Optionally the result can be returned sorted and/or paged.
PUT \disco\webapi\{entity}\{id}
Updates the {entity} given by {id}. Values are given as
application/x-disco-{entity} in HTTP header.
PUT \disco\webapi\{entity}\?filter={id}
Updates all {entity} that matches the filter given by {id}. Values are given
as application/x-disco-{entity} in HTTP header.
DELETE \disco\webapi\{entity}\{id}
Deletes the {entity} given by {id}.
DELETE \disco\webapi\{entity}\?filter={id}
Deletes all {entity} that matches the filter given by {id}.
POST \disco\webapi\filter\
Creates a new filter. Values are given as application/x-disco-filter in HTTP
header.
GET \disco\webapi\filter\{id}
Retrives the filter given by {id}. Values are returned as
application/x-disco-filter in HTTP header.
DELETE \disco\webapi\filter\{id}
Deletes the filter given by {id}.
Media Types
application/x-disco-filter+json
application/x-disco-{entity}+json
application/x-disco-{entity}-collection+json