As the documentation goes, joining and leaving a workspace create and delete, respectively, an artifact in the said workspace, which represents the body of the agent that did that particular action. Moreover, following this idea, the endpoint for joining a workspace returns the body RDF representation in Turtle format.
Proposed change
These two operations should be offered by two endpoints referring to the agent's body resource: the joining would be done by a POST request on the resource (or on the collection of resources) and the leaving by a DELETE request on the resource.
Pros
The current implementation contains an endpoint for getting the body representation and one for updating it, but no endpoint for creating or deleting it. This change would bring more symmetry to the API (reflecting better the principle of least astonishment), also considering how the artifact and the rest of the workspace API are structured.
Moreover, this would reflect a more resource-oriented and less RPC-like API, which is always good.
Context
As the documentation goes, joining and leaving a workspace create and delete, respectively, an artifact in the said workspace, which represents the body of the agent that did that particular action. Moreover, following this idea, the endpoint for joining a workspace returns the body RDF representation in Turtle format.
Proposed change
These two operations should be offered by two endpoints referring to the agent's body resource: the joining would be done by a POST request on the resource (or on the collection of resources) and the leaving by a DELETE request on the resource.
Pros
Cons