Skip to content

PodResourcesService

This service, automatically created by the AppService with the key pod-resources, allows you to manage resources through the LDP protocol. See this page for usage examples.

Actions

The following service actions are available.

post

Post a resource on a given LDP container.

Parameters

PropertyTypeDescription
containerUriURIContainer where the resource will be created
resourceObjectResource to create in JSON-LD format
actorUriURIWebID of the Pod on which the action should be done

Return value

The URI of the created resource

list

Get a LDP container

Parameters

PropertyTypeDescription
containerUriURIContainer to be fetched
actorUriURIWebID of the Pod on which the action should be done

Return value

The JSON-LD representation of the LDP container, formatted with the context of the application.

get

Get a LDP resource

Parameters

PropertyTypeDescription
resourceUriURIResource to be fetched
actorUriURIWebID of the Pod on which the action should be done

Return value

The JSON-LD representation of the LDP resource, formatted with the context of the application.

patch

Parameters

PropertyTypeDescription
resourceUriURIURI of resource to update
triplesToAddArrayArray of triples conforming with the RDF.js data model
triplesToRemoveArrayArray of triples conforming with the RDF.js data model
actorUriURIWebID of the Pod on which the action should be done

put

Update a resource, overwriting any existing data. This action should be used carefully, because if the resource was modified between the GET and the PUT, it will be lost. Use the patch method instead, whenever is possible.

Parameters

PropertyTypeDescription
resourceObjectResource to update in JSON-LD format
actorUriURIWebID of the Pod on which the action should be done

delete

Delete a resource.

Parameters

PropertyTypeDescription
resourceUriURIResource to delete
actorUriURIWebID of the Pod on which the action should be done