-
Notifications
You must be signed in to change notification settings - Fork 39
Description
The FDP spec specifies that /catalog is an LDP DirectContainer (kind of resource collection). For example:
<http://localhost:8080/catalog/> a ldp:DirectContainer;
dcterms:title "Catalogs";
ldp:membershipResource <http://localhost:8080>;
ldp:hasMemberRelation <https://w3id.org/fdp/fdp-o#metadataCatalog>;
ldp:contains <http://localhost:8080/catalog/catalog-1>, <http://localhost:8080/catalog/catalog-2> .Based HTTP semantics, the URI hierarchy implied by the API docs, and the LDP 1.0 spec, I would expect a GET request to the /catalog endpoint to return a list of catalogs, and similar for other containers like Dataset and Distribution.
However, although the FDP API does support POST requests to container endpoints, it does not support GET requests to container endpoints:
Instead, to get a list of catalogs, we need to make a GET request to /page/catalog with required query parameters size and page. For other containers it is similar, e.g. /catalog/{uuid}/page/distribution, as can be seen here:
FAIRDataPoint/src/main/java/org/fairdatapoint/api/controller/metadata/GenericController.java
Line 298 in f65cd35
| path = {"page/{childPrefix}", "{oUrlPrefix:[^.]+}/{oRecordId:[^.]+}/page/{childPrefix}"}, |
To limit confusion we should support GET for containers. Possibly get rid of the /page component and only use optional query parameters for paging control.
Note
The LDP 1.0 spec requires GET support
4.2.2.1 LDP servers MUST support the HTTP GET method for LDPRs.
Although FDP is not (yet) an LDP server, the FDP's use of LDP DirectContainer (which is an LDPR, i.e. LDP Resource) could imply similar behavior.
Also note that LDP paging behavior is specified in a separate document: LDP paging