2. Endpoints
Each operation of the Base Specification and of the extensions is an HTTP method on a URL path, relative to the base URL of the API.
| Operation | Method and path | Specification |
|---|---|---|
get |
GET /:collection/:id |
Base |
list |
GET /:collection, or QUERY /:collection |
Base |
create |
POST /:collection |
Base |
clone |
POST /:collection/:id/clone |
Base |
patchById |
PATCH /:collection/:id |
Base |
patchByQuery |
PATCH /:collection |
Base |
replaceById |
PUT /:collection/:id |
Base |
replaceByQuery |
PUT /:collection |
Base |
deleteById |
DELETE /:collection/:id |
Base |
deleteByQuery |
DELETE /:collection |
Base |
listByView |
GET /:collection/:view, or QUERY /:collection/:view |
Views (extension) |
HTTP_ENDPOINTS MUST
Servers MUST expose each operation they support with the method and path in the table above, where :collection is the Collection Slug, :id the Resource ID and :view the View name.
2.1 Paths
Section titled “2.1 Paths”The :id segment MUST be percent-encoded as required by RFC 3986. Composite Resource IDs (Base ID_COMP_KEY_URLENCODED) are encoded as a whole in the segment.
HTTP_PATH_VIEW_PRECEDENCE MUST
For GET /:collection/:segment and QUERY /:collection/:segment, when the Views extension is supported and a View named :segment exists in the Collection, the Server MUST execute the View; otherwise, :segment MUST be interpreted as a Resource ID.
HTTP_PATH_RESERVED MUST
Path segments starting with @ right after /:collection (for example /:collection/@views) are reserved for extensions, to expose resources about the Collection itself, and MUST NOT be interpreted as Resource IDs or View names.
2.2 The QUERY method
Section titled “2.2 The QUERY method”Servers MAY support the QUERY method (RFC 10008) for list and listByView, with the Search Query in the request body, labeled with its media type (such as application/vnd.unquery+json or text/vnd.unquery.sql). Conditions in the query string, if any, are combined with the body with and.
2.3 Writes on several Resources
Section titled “2.3 Writes on several Resources”HTTP_BYQUERY_FILTER_REQUIRED MUST
PATCH, PUT and DELETE on /:collection without any condition MUST fail with the INVALID_INPUT error. To affect every Resource of the Collection, the Client MUST send the empty filter @q={} explicitly.
2.4 The clone operation
Section titled “2.4 The clone operation”HTTP_CLONE MUST
POST /:collection/:id/clone MAY carry a patch in the body, as a JSON Patch (RFC 6902, application/json-patch+json) or a JSON Merge Patch (RFC 7396, application/merge-patch+json), and MUST respond with 201 Created and a Location header with the URL of the copy.
2.5 Managing Views
Section titled “2.5 Managing Views”The @views Collection of each Collection (Views VIEW_COLLECTION) uses the endpoints of section 2 under /:collection/@views, with the View name as the Resource ID.
| Operation | Method and path |
|---|---|
list |
GET /:collection/@views |
get |
GET /:collection/@views/:view |
create |
POST /:collection/@views |
clone |
POST /:collection/@views/:view/clone |
patchById, patchByQuery |
PATCH /:collection/@views/:view, PATCH /:collection/@views |
replaceById, replaceByQuery |
PUT /:collection/@views/:view, PUT /:collection/@views |
deleteById, deleteByQuery |
DELETE /:collection/@views/:view, DELETE /:collection/@views |
HTTP_VIEWS_ENDPOINTS MUST
Servers MUST expose the operations on Views they support with the method and path in the table above.
HTTP_VIEW_DESCRIBEDBY SHOULD
Responses of listByView for a View with a schema (Views VIEW_SCHEMA) SHOULD include a Link header field with the describedby relation to /:collection/@views/:view.
HTTP_VIEW_SCHEMA_RAW MUST
GET /:collection/@views/:view with Accept: application/schema+json MUST respond with only the value of the schema Field of the View, compiled as specified by ESType (ESType section 2), labeled application/schema+json. When the View has no schema, the Server MUST fail with the NOT_FOUND error, with target schema.
Source: lingodata/crud@bc225ba · specs/http/sections/02-endpoints.md · http 0.2.0 (draft)
LingoData specifications, reference implementations and this site are licensed under the Apache License 2.0. Copyright 2026 Gustavo Gondim.