Skip to content

HTTP GET support for container/collection endpoints #842

@dennisvang

Description

@dennisvang

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:

Image

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions