# Wallet Endpoint

{% hint style="success" %}
Added in version 2.3.
{% endhint %}

{% hint style="warning" %}
**Developer Preview**\
The ESS Wallet Service endpoints are available as part of a Developer Preview program to allow early access to these features. Please be aware that these APIs may change.
{% endhint %}

The ESS Wallet Service provides the following endpoint for interacting with resources stored in the Data Wallet:

```none
https://datawallet.{ESS Domain}/wallet
```

{% hint style="info" %}
**Note**\
To access the **`/wallet`** endpoint, users must be authenticated. The endpoint supports the use of HTTP-only, secure session cookies.
{% endhint %}

## List Resources

The Wallet Service provides an endpoint that returns a list of all the resources stored in the Wallet.

<table data-header-hidden><thead><tr><th width="160.86328125"></th><th></th></tr></thead><tbody><tr><td>Method</td><td><strong><code>GET</code></strong></td></tr><tr><td>Content-Type</td><td><strong><code>application/json</code></strong></td></tr><tr><td>Endpoint</td><td><strong><code>https://datawallet.{ESS Domain}/wallet</code></strong></td></tr><tr><td>Payload</td><td>none</td></tr></tbody></table>

### Output

Returns an array list of resources with the following fields:

#### **Example response**

```json
[
  {
    "fileName": "MyResource",
    "identifier": "https://storage.example/data/MyResource",
    "isRDFResource": true
  }
]
```

The fields have the following values

<table><thead><tr><th width="160.57421875">Field</th><th>Value</th></tr></thead><tbody><tr><td><strong><code>fileName</code></strong></td><td>The short-name of the resource without the hostname or parent path.</td></tr><tr><td><strong><code>identifier</code></strong></td><td>The URI identifying the resource.</td></tr><tr><td><strong><code>isRDFResource</code></strong></td><td>Boolean value `true</td></tr></tbody></table>

## Create/Update Resources

The Wallet Service provides an endpoint to create or update a resource stored in the Wallet.

<table data-header-hidden><thead><tr><th width="157.30859375"></th><th></th></tr></thead><tbody><tr><td>Method</td><td><strong><code>PUT</code></strong></td></tr><tr><td>Content-Type</td><td><strong><code>multipart/form-data</code></strong></td></tr><tr><td>Endpoint</td><td><strong><code>https://datawallet.{ESS Domain}/wallet</code></strong></td></tr><tr><td>Payload</td><td>The binary resource to create or update within the Wallet.</td></tr></tbody></table>

### Input

The endpoint accepts the name of the resource as a query parameter:

<table><thead><tr><th width="162.91796875">Query Parameter</th><th>Value</th></tr></thead><tbody><tr><td><strong><code>fileName</code></strong></td><td>The name of the resource without hostname or parent path.</td></tr></tbody></table>

The body of the request contains the binary data for the resource to be created or updated.

<table><thead><tr><th width="160.9921875">Body</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><strong><code>multipart/form-data</code></strong></td></tr><tr><td><strong><code>file</code></strong></td><td>The binary data of the file to create or update.</td></tr></tbody></table>

### Output

Successful completion returns the URI of the created or updated resource.

## Read Resource

The Wallet Service provides an endpoint to get the content of a Wallet resource.

<table data-header-hidden><thead><tr><th width="159.16796875"></th><th></th></tr></thead><tbody><tr><td>Method</td><td><strong><code>GET</code></strong></td></tr><tr><td>Content-Type</td><td><strong><code>*/*</code></strong></td></tr><tr><td>Endpoint</td><td><strong><code>https://datawallet.{ESS Domain}/wallet/{identifier}</code></strong></td></tr><tr><td>Payload</td><td>none</td></tr></tbody></table>

### Input

<table><thead><tr><th width="160.578125">Path Parameter</th><th>Value</th></tr></thead><tbody><tr><td><strong><code>identifier</code></strong></td><td>The filename of the Wallet resource from which content is to be returned.</td></tr></tbody></table>

<table><thead><tr><th width="161.6640625">Query Parameter</th><th>Value</th></tr></thead><tbody><tr><td><strong><code>raw</code></strong></td><td>A boolean value determining whether to process the Wallet resource as binary data (<strong><code>true</code></strong>) or as RDF when applicable (<strong><code>false</code></strong>).</td></tr></tbody></table>

### Output

The content of the identified resource.

## Delete Resource

The Wallet Service provides an endpoint to delete a Wallet resource.

<table data-header-hidden><thead><tr><th width="161.3203125"></th><th></th></tr></thead><tbody><tr><td>Method</td><td><strong><code>DELETE</code></strong></td></tr><tr><td>Content-Type</td><td><strong><code>application/json</code></strong></td></tr><tr><td>Endpoint</td><td><strong><code>https://datawallet.{ESS Domain}/wallet/{identifier}</code></strong></td></tr><tr><td>Payload</td><td>none</td></tr></tbody></table>

### Input

<table><thead><tr><th width="162.57421875">Path Parameter</th><th>Value</th></tr></thead><tbody><tr><td><strong><code>identifier</code></strong></td><td>The filename of the Wallet resource to be deleted.</td></tr></tbody></table>

### Output

Upon completion, a status message is returned.

**Example response**

```json
{
    "message": "success"
}
```

The fields have the following values:

<table><thead><tr><th width="130.46484375">Field</th><th>Value</th></tr></thead><tbody><tr><td><strong><code>message</code></strong></td><td>A successful operation includes the string “success”.</td></tr><tr><td><strong><code>error</code></strong></td><td>An unsuccessful operation describes the failure category, such as “UNAUTHORIZED”.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inrupt.com/ess/2.4/services/service-wallet/wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
