Skip to content

Append operations on RDF bearing resources #305

@kjetilk

Description

@kjetilk

Append operations on non-container resources are currently not defined in the spec, and it is clear that what it means to append to a resource will depend on the media type of the target resource. There are some media types that have a straightforward interpretation, among them notably RDF sources. I therefore suggest that we have generic language in the spec and that we define append operations for certain media types, in the continuation of #118.

Moreover, that an append operation can be done using POST is very
clearly stated in RFC7231:

Appending data to a resource's existing representation(s).

It has actually been in since the very first description of HTTP:

Extending a document during authorship.

So, given that simply adding some data is a common requirement, we have an append operation in Solid, a clear description in HTTP and a straigthforward interpretation in RDF, it seems very clear that we should do it.

I therefore suggest that we add something like this to the Protocol:

Append operations to a non-container resource

When a POST method request targets a non-container resource with an existing representation, the server MUST interprete that as an Append operation. The behaviour of an append operation depends on the media type. Servers MAY implement append algorithms for any media type. If the request contains a media type that the Server has no append algorithm for, it MUST respond with the 415 status code. Servers MUST implement the two following append algorithms:

Media types for RDF serializations

If the target resource and the request payload has a RDF bearing representation, then the server MUST use the RDF Merge algorithm to append the request payload into the target resource. This is equivalent but simpler than to PATCH the target resource using INSERT DATA from SPARQL Update.

text/plain media type.

If the target resource and the request payload has the text/plain media type, then the server MUST append the request payload to the end of the target resource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Consensus Phase

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions