A [=Solid server=] sending a [PROTOCOL] notification as a result of some activity on a resource MUST set the type property as the [[ACTIVITYSTREAMS-VOCABULARY#activity-types|type of activity]] that triggered the notification as specified by the Activity Streams vocabulary [[ACTIVITYSTREAMS-VOCABULARY]].
Implementation Guidance
When a resource is modified by virtue of an HTTP request, the activity type ought to be set as follows:
- When the [PREP] notification is triggered by a request on the resource with one of the following [[RFC9110#methods|HTTP methods]]:
<table class="numbered">
<caption> Activity Mapping for Resources
<thead>
<tr>
<th> Request Method
<th> Activity Type
<tbody>
<tr>
<td><code> [[RFC9110#POST|POST]] <br> ([[SOLID-PROTOCOL#resource-containment|Containers]])
<td><code> [[ACTIVITYSTREAMS-VOCABULARY#dfn-add|as:Add]]
<tr>
<td><code> [[RFC9110#PUT|PUT]]
<td rowspan="3"><code> [[ACTIVITYSTREAMS-VOCABULARY#dfn-update|as:Update]]
<tr>
<td><code> [[RFC5789#section-2|PATCH]]
<tr>
<td><code> [[RFC9110#POST|POST]] <br> (Not [[SOLID-PROTOCOL#resource-containment|Containers]])
<tr>
<td><code> [[RFC9110#DELETE|DELETE]]
<td><code> [[ACTIVITYSTREAMS-VOCABULARY#dfn-delete|as:Delete]]
</table>
<br/>
- When the [PREP] notification is triggered on a container, by a request on a contained resource with one of the following [[RFC9110#methods|HTTP methods]]:
<table class="numbered">
<caption> Activity Mapping for LDP Containers when contained resources change
<thead>
<tr>
<th> Request Method
<th> Activity Type
<tbody>
<tr>
<td><code> [[RFC9110#PUT|PUT]]
<td rowspan="2"><code> [[ACTIVITYSTREAMS-VOCABULARY#dfn-update|as:Update]]
<tr>
<td><code> [[RFC5789#section-2|PATCH]]
<tr>
<td><code> [[RFC9110#DELETE|DELETE]]
<td><code> [[ACTIVITYSTREAMS-VOCABULARY#dfn-remove|as:Remove]]
</table>
<br/>
- When the [PREP] notification is triggered on a container, by a request to create a new resource inside that container (resource) with one of the following [[RFC9110#methods|HTTP methods]]:
<table class="numbered">
<caption> Activity Mapping for LDP Containers when contained resources are created
<thead>
<tr>
<th> Request Method
<th> Activity Type
<tbody>
<tr>
<td><code> [[RFC9110#PUT|PUT]]
<td rowspan="2"><code> [[ACTIVITYSTREAMS-VOCABULARY#dfn-add|as:Add]]
<tr>
<td><code> [[RFC5789#section-2|PATCH]]
</table>