Skip to content

Initial CRUD with proposed metadata handling - #37

Merged
ebremer merged 7 commits into
w3c:mainfrom
ebremer:crudandmeta
Jan 20, 2026
Merged

ebremer merged 7 commits into
w3c:mainfrom
ebremer:crudandmeta

Conversation

@ebremer

@ebremer ebremer commented Sep 12, 2025 •

Copy link
Copy Markdown
Contributor

@ebremer
ebremer marked this pull request as draft September 12, 2025 14:57
@ebremer
ebremer force-pushed the crudandmeta branch 3 times, most recently from f0ea3b6 to 9d01d26 Compare September 12, 2025 15:55
@TallTed

TallTed commented Sep 29, 2025

Copy link
Copy Markdown
Member

I'm curious about the removal of slash semantics. For some years, ending a resource identifier with a slash in its creation has been the way to indicate that the user wants it to be a container. How does a user indicate this desire without the slash semantics?

@gibsonf1

Copy link
Copy Markdown

I'm curious about the removal of slash semantics. For some years, ending a resource identifier with a slash in its creation has been the way to indicate that the user wants it to be a container. How does a user indicate this desire without the slash semantics?

@TallTed I think the solid spec uses the link header to determine if a new resource should be a container with no reference to the slash semantics. For TrinPod, we only look for http://www.w3.org/ns/ldp#BasicContainer; and http://www.w3.org/ns/ldp#Container; in the link header to set as a container or not.

@TallTed

TallTed commented Sep 30, 2025 •

Copy link
Copy Markdown
Member

I think the solid spec uses the link header to determine if a new resource should be a container with no reference to the slash semantics. For TrinPod, we only look for http://www.w3.org/ns/ldp#BasicContainer; and http://www.w3.org/ns/ldp#Container; in the link header to set as a container or not.

I think I remember this slash pattern from LDP spec development, where one of the goals was to enable full functionality with simple tools like curl (where you can specify headers and their values, but doing so is a rather heavier load than putting a slash on the end of a container target). I think it's not the link header, but the media-type header, that matters for uploads (PUT) or creates (POST).

I think something along the lines of the sentences above should be added to the LWS spec, i.e., replace the previously available "Just put a slash at the end!" pattern with a "just include this header with this value. For example, use this flag and this argument with curl!"

@ebremer
ebremer force-pushed the crudandmeta branch 3 times, most recently from d772ac0 to a8b6d19 Compare November 26, 2025 21:37
@ebremer
ebremer marked this pull request as ready for review December 1, 2025 14:47
@@ -0,0 +1,135 @@
### Create Resource (HTTP POST)

New resources are created using POST to a target container URI, with the server assigning the final identifier. Clients MAY suggest a name via the Slug header, but servers MUST have authority over naming to ensure uniqueness and compliance with policies. PUT is reserved for updates to existing resources and MUST NOT be used for creation in this version of the specification, to prioritize server-managed identifiers and simplify client-server interactions. Clients MAY provide initial user-managed metadata for the new resource by including one or more Link headers in the POST request, following the syntax of [RFC 8288]. Server-managed metadata MUST be generated automatically by the server upon creation and MUST NOT be overridden by client-provided links.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to support create with PUT/PATCH, using conditional requests.
Since Slug header can't be relied on, there doesn't seem to be a way for the client to create at specific location. This makes it harder to build offline-first application since resources can't be fully interlinked locally before syncing them with the web storage.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't the best place to discuss it. I will find existing use case or add a new one for creating linked resources offline and bring it up later. The can be other ways to address it.

@acoburn acoburn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't finished my review, but this covers much of the text.

Comment on lines +16 to +21
**Possible Responses:** *(on the abstract operation level, not tied to a specific protocol)*
* **Created:** The operation succeeded in creating a new resource. The response includes the new resource’s identifier and possibly a minimal representation or metadata.
* **Bad Request:** The request was malformed or violated constraints. The resource was not created.
* **Not Permitted:** The client is not authorized to create a resource in the target location.
* **Not Found:** The specified target container does not exist or cannot be found. This could also be treated as a type of Bad Request or Not Permitted, depending on the cause.
* **Unknown Error:** An internal server error occurred, or some unexpected condition prevented the creation. This is a catch-all for failures not covered by more specific errors. The response would indicate that the server failed the operation (and ideally include an error message or code). No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an exhaustive list? Could there be other responses? I think it would be good to allow other possible responses.

Comment thread lws10-core/Rest-Binding/rest-table.md Outdated
| ----- | ----- | ----- |
| [Success](https://w3c.github.io/lws-protocol/spec/#dfn-success) Success (read or update, returning data) | 200 OK | [Resource representation](https://w3c.github.io/lws-protocol/spec/#dfn-resource-representation) in the response body (for GET or if PUT/PATCH returns content), along with relevant headers (Content-Type, ETag, Link for metadata such as rel="linkset", rel="acl", rel="parent"). For container listings, include JSON-LD with normative context and member metadata (IDs, types, sizes, timestamps). |
| Partial Success (paginated or ranged read) | 206 Partial Content | Partial resource representation, with headers like Content-Range or Link rel="next" for pagination. Listings include filtered metadata per ACL visibility. |
| [Created](https://w3c.github.io/lws-protocol/spec/#dfn-created) (new resource) | 201 Created | Typically no response body (or a minimal representation of the new resource). The `Location` header is set to the new resource’s URI. Headers like ETag MUST be included for concurrency; Link headers for server-managed metadata. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the response body is empty and an ETag value is supplied, this will mess with caches. Generally speaking, ETags are not included in POST responses.

I would state that the Location header is required in the response.

Comment thread lws10-core/Rest-Binding/rest-table.md Resolved
Comment thread lws10-core/Rest-Binding/rest-table.md Outdated
Comment on lines +12 to +20
| [Unknown requester](https://w3c.github.io/lws-protocol/spec/#dfn-unknown-requester) | 401 Unauthorized | Typically no body or an error message. The response MUST include a `WWW-Authenticate` header with parameters for discoverability and authentication negotiation (per HTTP spec). This indicates the client needs to provide credentials. |
| [Not Permitted](https://w3c.github.io/lws-protocol/spec/#dfn-not-permitted) (forbidden) | 403 Forbidden | An error message or none. Indicates the client’s credentials were accepted but they don’t have rights to perform the operation. |
| Not found | 404 Not Found | Possibly an error message. Indicates the resource (or target URI) does not exist *or* is not accessible. (Servers MUST use 404 in place of 403 for unauthorized reads to avoid revealing the existence of a resource, aligning with privacy considerations.) |
| Not acceptable | 406 Not Acceptable | Typically a short message listing supported formats or indicating that the requested representation cannot be provided. The client may use this information to retry with a different `Accept`. |
| Conflict | 409 Conflict | Explanation of the conflict. The body could include specifics or be empty with just the status reason. |
| Precondition Failed (concurrency) | 412 Precondition Failed | If an `If-Match` or similar header doesn’t match, this status is returned with maybe a brief message. |
| Unsupported Media Type | 415 Unsupported Media Type | If the client sent a format that the server cannot handle (for create or update). The body might list acceptable media types. |
| Insufficient Storage (quota exceeded) | 507 Insufficient Storage | Error details indicating quota or storage constraints violated. Could include current usage information in the body. |
| Internal Server Error [Unknown error](https://w3c.github.io/lws-protocol/spec/#dfn-unknown-error) | 500 Internal Server Error | A generic error message. In a debug or dev mode, the server might include a stack trace or internal details in the body, but in production it should be a generic statement. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all standard HTTP error codes (and there are other possible response codes). I would avoid restating what already exists in the HTTP spec.

Comment thread lws10-core/Rest-Binding/rest-table.md Outdated

This mapping table is intended to cover the typical cases, ensuring atomicity with metadata operations and support for discoverability. Note that some status codes above (206, 412, 415, 507) are standard HTTP but were not explicitly enumerated in Section 7’s generic list; they are used here to handle HTTP-specific scenarios (like pagination, conditional requests, media type handling, and quotas). LWS servers should use the most appropriate HTTP status code for each situation to enable clients to react correctly.

By adhering to these method bindings and status codes, LWS clients and servers can interoperate using HTTP in a predictable, RESTful way. This allows leveraging existing HTTP libraries, tools, and knowledge for building LWS-based systems. No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more for a non-normative introduction section rather than a normative section.

Comment thread lws10-core/Rest-Binding/rest-table.md Outdated
| Insufficient Storage (quota exceeded) | 507 Insufficient Storage | Error details indicating quota or storage constraints violated. Could include current usage information in the body. |
| Internal Server Error [Unknown error](https://w3c.github.io/lws-protocol/spec/#dfn-unknown-error) | 500 Internal Server Error | A generic error message. In a debug or dev mode, the server might include a stack trace or internal details in the body, but in production it should be a generic statement. |

This mapping table is intended to cover the typical cases, ensuring atomicity with metadata operations and support for discoverability. Note that some status codes above (206, 412, 415, 507) are standard HTTP but were not explicitly enumerated in Section 7’s generic list; they are used here to handle HTTP-specific scenarios (like pagination, conditional requests, media type handling, and quotas). LWS servers should use the most appropriate HTTP status code for each situation to enable clients to react correctly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this paragraph state anything that isn't already part of the HTTP RFC?

@TallTed

TallTed commented Jan 2, 2026 •

Copy link
Copy Markdown
Member

Too many commits & comments in a single PR.

GitHub now says to me, "Some comments aren't visible on the classic Files Changed page. Switch to the new experience." and then "Only the first 40 comments are currently being shown. To see more, switch back to the classic page."

I cannot tell what comments are visible on each, nor what comments are visible on neither — so cannot review the entire PR in either view.

@gibsonf1

gibsonf1 commented Jan 3, 2026 •

Copy link
Copy Markdown

For Creating resources, why is it not possible to create a resource in the Storage itself outside of a container?

"Target container identifier: The identifier of an existing container where the new resource will be created as a member."

"8.4 Containment and Hierarchy
With the exception of the root container, every resource is affiliated with precisely one parent container."

How does this work with linked data in general where the subject uri for a resource is not on a path uri in an LWS storage system?

Having resources where linked data subject uri's are able to be in the LWS itself (and potentially in many different LWS's) and not in a particular container solves this problem created by emulating an old directory tree structure for files.

For cases where container structures are used, having more than a single membership predicate enables support for non file hierarchies. Currently, TwinPod supports the following membership predicates:

<https://neo.graphmetrix.net/node/m_join>
 <http://www.w3.org/2004/02/skos/core#narrower>
 <http://semanticscience.org/resource/SIO_000202>
 <http://www.w3.org/ns/ldp#contains>
 <https://neo.graphmetrix.net/node/r_subclass>
 <http://www.w3.org/2005/01/wf/flow#message>

@jeswr

jeswr commented Jan 5, 2026

Copy link
Copy Markdown
Member

From discussion in editors call - the diff of this as compared to the Solid specification is as followed:

  • The following are required in the Solid spec but not in this PR:
    • Patch
    • Slash semantics
  • The following are required in this spec but not in the Solid spec:
    • Metadata modification is handled via a patch

@elf-pavlik elf-pavlik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this PR as a great baseline to iterate further with smaller PRs addressing very specific issues.

@ebremer
ebremer force-pushed the crudandmeta branch 8 times, most recently from 4e215fb to f609363 Compare January 5, 2026 20:43
…on, REST Binding

trim and make text more concise

formatting

add concurrency control

PA modifications

~ reorg for multiple specs

remove non-normative text

Update lws10-core/Operations/create-resource.md

clarify response and make it less prescriptive.

move text (if needed) to authorization section

more spacing

spacing

spacing

spacing

make PATCH a MUST for metadata update and PUT optional

make text more concise

remove response codes already part of http spec

fix links

remove range requests line to make it more concise

clarify returned metadata.  remove filter text for later PR

remove server sending an HTML page.  security considerations.  remove content negotiation text

remove text

remove security considerations text

consolidate text for abstract delete and separate examples in HTTP Delete section

the storage description link uses a Link header, not a WWW-Authenticate parameter

simplify text

use application/lws+json for container creation.  Remove linksetfilter work for later PR

make text more concise.

remove "Servers MUST support concurrency ...".  Change out text with alternate wording.

remove uncalled response

removed dc elements in favor or dc terms.  Removed placeholder metadata.

clairify text

remove mandatory/optional text remove defined for acl, linkset, type, mediaType (now representation) clairify potenitally ambiguous text

remove advanced property/relation filtering for now

revise text to use https://www.w3.org/ns/lws#PreferLinkRelations omit/include

trim text

remove text

remove 403 vs 404 text

remove text

remove restrictive text

remove auth text redundant to authorization section

update links

remove HTTP examples (add to HTTP binding section if not already there)

remove security consideration text

Update lws10-core/Operations/read-resource.md

remove text to be potentially relocated to security considerations section

remove unnecessary text

clarify concurrency control text

clarify that the list is not exhaustive

remove unineeded wording.

remove ambigious phrasing.

Update lws10-core/Operations/read-resource.md

Update lws10-core/Operations/delete-resource.md

Update lws10-core/Rest-Binding/rest-create-resource.md

Update lws10-core/Rest-Binding/rest-create-resource.md

Update lws10-core/Rest-Binding/rest-create-resource.md

Update lws10-core/Rest-Binding/rest-delete-resource.md

Update lws10-core/Rest-Binding/metadata.md

Update lws10-core/Rest-Binding/metadata.md

Update lws10-core/Rest-Binding/metadata.md

Update lws10-core/Rest-Binding/metadata.md

Update lws10-core/Operations/update-resource.md

Update lws10-core/Operations/update-resource.md

Update lws10-core/Operations/update-resource.md

Update lws10-core/Operations/update-resource.md

Update lws10-core/Operations/read-resource.md

Update lws10-core/Rest-Binding/rest-delete-resource.md

Update lws10-core/Rest-Binding/metadata.md

Update lws10-core/Operations/delete-resource.md

Update lws10-core/Operations/delete-resource.md

Update lws10-core/Operations/delete-resource.md

Update lws10-core/Operations/delete-resource.md

Update lws10-core/Operations/create-resource.md

corrected lws namespaces

make modifications to reflect terminology (partOf, contains, etc)

Apply suggestions from code review

Adjust datatype

Oct 2025 Meeting outcomes

standardize one json patching method, remove binary patch

Align draft spec based on discussion from Belgium Face-to-face to present day

remove slash semantics

normalize attr with attributes (instead of fields)

remove slash semantics

format

formatting

clarify

formatting

fix links

define three types of metedata

add metadata via web linking

reorganize sections to folders

formatting

Update spec/create-resource.md

Update spec/delete-resource.md

formatting

formatting

formatting

link for brevity

Update spec/create-resource.md

Update spec/create-resource.md

Update spec/rest-read-resource.md

Apply suggestions from code review

formatting

Co-Authored-By: Aaron Coburn <[email protected]>
Co-Authored-By: Ted Thibodeau Jr <[email protected]>
Co-Authored-By: Jesse Wright <[email protected]>
@ebremer

ebremer commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

As per LWS meeting 1/5/2026, #37 has been rebased to 1 commit

@TallTed

TallTed commented Jan 5, 2026

Copy link
Copy Markdown
Member

2 commits with +544 & −101 lines, across 21 files. Should be much more reviewable, thank you!

@acoburn acoburn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good step forward. There are some improvements that can come later (I do not think they need to hold up this PR). Some improvements are:

  • It is unclear to me what is normative text and what is non-normative text. This may be due to my greater familiarity with the HTML format used by respec as opposed to the markdown format.
  • The text seems verbose or redundant in places. I suspect that there are ways to simplify the various sections to avoid redundancy
  • I am not convinced about certain requirements (e.g. ETags). Yes, their use is a very good idea, but should this actually be required? I don't think so

Still, I think this is in good enough shape to merge and move forward. This will allow us to have more targeted refinements as follow-up PRs.

Comment thread lws10-core/Rest-Binding/metadata.md Resolved
Comment thread lws10-core/Rest-Binding/metadata.md Outdated
| http://purl.org/dc/terms/creator | [dcterms](http://purl.org/dc/terms/) |

**Modifiability Considerations**
Core metadata, such as 'partOf', 'contains', 'type', 'title', and 'creator', MAY be modified by clients via PATCH operations on the associated linkset resource; servers MUST support JSON Merge Patch for partial updates. Servers MAY also support PUT for complete metadata replacement, but clients SHOULD NOT assume its availability and MUST handle rejections accordingly. However, servers MAY impose restrictions on certain core links to maintain system integrity. For instance, modifying the 'partOf' or 'contains' link to 'move' a resource is OPTIONAL for server implementations, as it may involve complex operations like updating slash-based semantics or decoupling containment meanings. Clients SHOULD NOT assume universal support for such changes and MUST handle server rejections. Servers that do not support modifications to 'partOf' MUST document this in their conformance statements. Metadata lifecycles are tied to the described resource, with automatic deletion upon resource removal.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be easier to state that servers MUST advertise GET and PATCH support via the Allow header. Furthermore, we can require that JSON Merge Patch support be advertised via the Accept-Patch header, i.e., Accept-Patch: application/merge-patch+json. Any other features a server provides (alternative methods or serialization support) would just use those same mechanisms.

Comment on lines +38 to +46
Because a resource's metadata can be modified by multiple actors, preventing concurrent overwrites is critical. To ensure data integrity, LWS servers and clients MUST implement optimistic concurrency control using conditional requests [[RFC 7232](https://datatracker.ietf.org/doc/html/rfc7232)] for all PUT and PATCH operations on a linkset resource.
Server Responsibilities:
A server **MUST** include an Etag header in its responses to GET and HEAD requests for a linkset resource.
Upon a successful PUT or PATCH on the linkset, the server MUST generate a new, unique Etag value for the modified linkset and return it in the Etag header of the response.
Client Responsibilities:
When modifying a linkset resource, a client MUST include an If-Match header containing the most recent Etag it received for that resource.
Processing Rules:
If the If-Match header value does not match the linkset's current Etag, the server MUST reject the request with a 412 Precondition Failed status code.
If the If-Match header is missing from a PUT or PATCH request to a linkset URI, the server MUST reject the request with a 428 Precondition Required status code [[RFC 6585](https://datatracker.ietf.org/doc/html/rfc6585#section-3)].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requiring ETags seems excessive. Instead, I would suggest that clients SHOULD use concurrency headers to avoid lost updates.

@gibsonf1 gibsonf1 Jan 10, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely agree with requiring ETags - they are the foundation for all caching, including in the browser caches.

Comment thread lws10-core/Rest-Binding/restbinding.md Outdated
@@ -0,0 +1,5 @@
This section defines how the generic operations and responses from Section 7 are realized over HTTP using RESTful conventions. It specifies the HTTP methods, request formats, and status codes that an [LWS REST Servers](https://w3c.github.io/lws-protocol/spec/#dfn-lws-rest-server) and [LWS REST Clients](https://w3c.github.io/lws-protocol/spec/#dfn-lws-rest-client) should use for interoperability. In other words, it’s a concrete mapping of the abstract operations to HTTP requests and responses. The following assumes an LWS server exposing resources via HTTP URIs, and an LWS client using HTTP methods (GET, POST, PUT, PATCH, DELETE, etc.) to invoke the operations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using relative links would be better here. These links will break once it is moved to a different domain

Comment thread lws10-core/Rest-Binding/restbinding.md Outdated
@@ -0,0 +1,5 @@
This section defines how the generic operations and responses from Section 7 are realized over HTTP using RESTful conventions. It specifies the HTTP methods, request formats, and status codes that an [LWS REST Servers](https://w3c.github.io/lws-protocol/spec/#dfn-lws-rest-server) and [LWS REST Clients](https://w3c.github.io/lws-protocol/spec/#dfn-lws-rest-client) should use for interoperability. In other words, it’s a concrete mapping of the abstract operations to HTTP requests and responses. The following assumes an LWS server exposing resources via HTTP URIs, and an LWS client using HTTP methods (GET, POST, PUT, PATCH, DELETE, etc.) to invoke the operations.

For each core operation (create, read, update, delete), we describe the HTTP method(s) to use, required headers or special considerations (including concurrency controls via ETags, content negotiation, and pagination for container listings), and what the server should do and return. Standard HTTP status codes are used to indicate outcomes (success or various errors), following the semantics outlined in Section 7, with additional mappings for scenarios such as quota exceeded (507 Insufficient Storage) or precondition failures (412 Precondition Failed). The binding tries to adhere to HTTP/1.1 and relevant RFCs (such as [[RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231)] for HTTP semantics, [[RFC 7233](https://datatracker.ietf.org/doc/html/rfc7233)] for range requests, [[RFC 5789](https://www.rfc-editor.org/rfc/rfc5789.html)] for PATCH, [[RFC 8288](https://www.rfc-editor.org/rfc/rfc8288.html)] for Web Linking, and [[RFC 9264](https://www.rfc-editor.org/rfc/rfc9264.html)] for Link Sets) so that it integrates naturally with web standards. Discoverability is emphasized through mechanisms like Link headers and WWW-Authenticate headers on 401 responses, avoiding hardcoded URI locations. Metadata integration, as defined in Section 9.1, is required across operations, ensuring atomicity and use of Link Sets for server-managed and user-managed properties.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, RFC references should use [[spec-ref]]. For normative references, use [[!spec-ref]]

Comment thread lws10-core/Security-Considerations.md Outdated
@@ -0,0 +1,2 @@
this left intentionally blank

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is no longer relevant and should be removed

@gibsonf1

gibsonf1 commented Jan 10, 2026 •

Copy link
Copy Markdown

Ability to use subject URI that is not "native" to URI path of LWS server.

Use cases include: Scientists using the same standard protein uri as a subject resource in their LWS, Adding a resource where the subject URI is a location (geo) a topic (wikidata) a bookmark (any uri), having ontology in your LWS that you can count on that uses commonly understood URIs, such as schema: foaf: sio: etc., adding a resource about a friend's webid, a company/org webid etc.

For this section:

7.1.1 Create Resource Operation
The create resource operation requests the creation of a new resource on the server. The resource can be a non-container (data) resource or a container (collection) resource. The operation mandates that the server assigns a new identifier within a target container.

Propose revise above to:
"The operation mandates that the server assigns a new identifier within a target container unless a subject resource URI is specified in the request"

Inputs:
- Target container identifier: The identifier of an existing container where the new resource will be created as a member.

Propose revise above to:
"The identifier of an existing container where the new resource will be created as a member or the LWS storage identifier when no container membership is requested"

Propose add under Inputs:

  • subject: The identifier of a subject resource when that resource identifier lies outside the LWS storage URI
7.2.1 Read Resource Operation
...
Inputs:
- Target identifier: The unique identifier of the resource or container to read.

Propose revise to:

  • Target identifier: The unique identifier of the resource or container to read. When the subject URI lies outside the LWS URI path, indicate the subject of the request with a query string appended to the target, ie &subject=https%3A%2F%2Falice.com%2Fi

(The same strategy for the other verbs, https://example.pod.com&subject=https%3A%2F%2Falice.com%2Fi )

Comment thread lws10-core/operations.md Resolved
melvincarvalho added a commit to JavaScriptSolidServer/JavaScriptSolidServer that referenced this pull request Jan 14, 2026
Add optional --lws-mode flag to support W3C Linked Web Storage protocol
semantics alongside current Solid/LDP implementation.

Changes:
- Add lwsMode config flag (CLI, env var, config file)
- Implement PUT restriction in LWS mode (updates only, not creation)
- Add request.lwsMode decoration in server
- Add basic LWS tests demonstrating PUT/POST behavior
- Document LWS mode in README with examples

Key difference: In LWS mode, PUT returns 404 for non-existent resources
and suggests using POST for creation (server-assigned URIs with Slug).

Status: DRAFT - LWS spec is in early stages. This captures the basic
infrastructure for future development. See issue #87 for full plan.

Related: #87
Spec: w3c/lws-protocol#37
@gibsonf1

Copy link
Copy Markdown
GET (container resource) – List a container’s contents: When the target URI corresponds to a container (determined via metadata type), a GET request will return a listing of the container’s members rather than raw content. Servers MUST support pagination for large memberships, using query parameters or headers to return partial listings with links to subsequent pages, responding with 206 Partial Content for paginated responses. Listings MUST include metadata for each member: resource IDs (MUST), types as an array of system and user-defined (MUST), representations with mediaType and optional sizeInBytes (MUST for DataResources), modified timestamps (SHOULD).

For Container resources, hierarchy up from that container should also be delivered so apps can navigate etc (Standard on TwinPod for all requests).

For paging, the paging approach should not use the LDP paging as this is not cacheable, but a simple approach which servers can cache with, such as Apache with start=n&rows=m. If apps want to include defining page lengths etc, they can, and then use the simple paging query to the server for caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants