> For the complete documentation index, see [llms.txt](https://docs.rememberizer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rememberizer.ai/ja/rissu/api-docs/mementos.md).

# メメントAPI

メメントは、ユーザーがアプリケーションによってアクセス可能な文書のコレクションを定義できるようにします。この文書では、利用可能なメメント API について説明します。

## メメントのリスト

{% openapi src="/files/NPsg8DFwcSjopKSuZo9m" path="/mementos/" method="get" %}
[rememberizer\_openapi.yml](https://3282965451-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK09NlRK7lXZsjqCNQsEe%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=dd73efa7-56a8-4350-88ab-85d7586fb7b8)
{% endopenapi %}

### 例リクエスト

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET \
  https://api.rememberizer.ai/api/v1/mementos/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換えてください。
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const fetchMementos = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/mementos/', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN'
    }
  });
  
  const data = await response.json();
  console.log(data);
};

fetchMementos();
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換えてください。
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def fetch_mementos():
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN"
    }
    
    response = requests.get(
        "https://api.rememberizer.ai/api/v1/mementos/",
        headers=headers
    )
    
    data = response.json()
    print(data)

fetch_mementos()
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換えてください。
{% endhint %}
{% endtab %}
{% endtabs %}

## メメントを作成する

{% openapi src="/files/NPsg8DFwcSjopKSuZo9m" path="/mementos/" method="post" %}
[rememberizer\_openapi.yml](https://3282965451-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK09NlRK7lXZsjqCNQsEe%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=dd73efa7-56a8-4350-88ab-85d7586fb7b8)
{% endopenapi %}

### 例リクエスト

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST \
  https://api.rememberizer.ai/api/v1/mementos/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "作業文書"}'
```

{% hint style="info" %}
このAPI呼び出しをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換えてください。
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const createMemento = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/mementos/', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: '作業文書'
    })
  });
  
  const data = await response.json();
  console.log(data);
};

createMemento();
```

{% hint style="info" %}
このAPI呼び出しをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換えてください。
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def create_memento():
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN",
        "Content-Type": "application/json"
    }
    
    payload = {
        "name": "作業文書"
    }
    
    response = requests.post(
        "https://api.rememberizer.ai/api/v1/mementos/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    data = response.json()
    print(data)

create_memento()
```

{% hint style="info" %}
このAPI呼び出しをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換えてください。
{% endhint %}
{% endtab %}
{% endtabs %}

## メメントの詳細を取得

{% openapi src="/files/NPsg8DFwcSjopKSuZo9m" path="/mementos/{id}/" method="get" %}
[rememberizer\_openapi.yml](https://3282965451-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK09NlRK7lXZsjqCNQsEe%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=dd73efa7-56a8-4350-88ab-85d7586fb7b8)
{% endopenapi %}

### 例のリクエスト

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET \
  https://api.rememberizer.ai/api/v1/mementos/123/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに、`123`を実際のメメントIDに置き換えてください。
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const getMementoDetails = async (mementoId) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/mementos/${mementoId}/`, {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN'
    }
  });
  
  const data = await response.json();
  console.log(data);
};

getMementoDetails(123);
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに、`123`を実際のメメントIDに置き換えてください。
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def get_memento_details(memento_id):
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN"
    }
    
    response = requests.get(
        f"https://api.rememberizer.ai/api/v1/mementos/{memento_id}/",
        headers=headers
    )
    
    data = response.json()
    print(data)

get_memento_details(123)
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに、`123`を実際のメメントIDに置き換えてください。
{% endhint %}
{% endtab %}
{% endtabs %}

## メメントドキュメントの管理

{% openapi src="/files/NPsg8DFwcSjopKSuZo9m" path="/mementos/memento\_document/{memento\_id}/" method="post" %}
[rememberizer\_openapi.yml](https://3282965451-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK09NlRK7lXZsjqCNQsEe%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=dd73efa7-56a8-4350-88ab-85d7586fb7b8)
{% endopenapi %}

### 例のリクエスト

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST \
  https://api.rememberizer.ai/api/v1/mementos/memento_document/123/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "memento": "123",
    "add": ["document_id_1", "document_id_2"],
    "folder_add": ["folder_id_1"],
    "remove": ["document_id_3"]
  }'
```

{% hint style="info" %}
このAPI呼び出しをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換え、実際のドキュメントおよびフォルダーIDを使用してください。
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const manageMementoDocuments = async (mementoId) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/mementos/memento_document/${mementoId}/`, {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      memento: mementoId,
      add: ["document_id_1", "document_id_2"],
      folder_add: ["folder_id_1"],
      remove: ["document_id_3"]
    })
  });
  
  const data = await response.json();
  console.log(data);
};

manageMementoDocuments(123);
```

{% hint style="info" %}
このAPI呼び出しをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換え、実際のドキュメントおよびフォルダーIDを使用してください。
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def manage_memento_documents(memento_id):
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN",
        "Content-Type": "application/json"
    }
    
    payload = {
        "memento": memento_id,
        "add": ["document_id_1", "document_id_2"],
        "folder_add": ["folder_id_1"],
        "remove": ["document_id_3"]
    }
    
    response = requests.post(
        f"https://api.rememberizer.ai/api/v1/mementos/memento_document/{memento_id}/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    data = response.json()
    print(data)

manage_memento_documents(123)
```

{% hint style="info" %}
このAPI呼び出しをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに置き換え、実際のドキュメントおよびフォルダーIDを使用してください。
{% endhint %}
{% endtab %}
{% endtabs %}

## メメントの削除

{% openapi src="/files/NPsg8DFwcSjopKSuZo9m" path="/mementos/{id}/" method="delete" %}
[rememberizer\_openapi.yml](https://3282965451-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK09NlRK7lXZsjqCNQsEe%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=dd73efa7-56a8-4350-88ab-85d7586fb7b8)
{% endopenapi %}

### 例のリクエスト

```bash
curl -X DELETE \
  https://api.rememberizer.ai/api/v1/mementos/123/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに、`123`を実際のメメントIDに置き換えてください。
{% endhint %}

```javascript
const deleteMemento = async (mementoId) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/mementos/${mementoId}/`, {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN'
    }
  });
  
  if (response.status === 204) {
    console.log("メメントが正常に削除されました");
  } else {
    console.error("メメントの削除に失敗しました");
  }
};

deleteMemento(123);
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに、`123`を実際のメメントIDに置き換えてください。
{% endhint %}

```python
import requests

def delete_memento(memento_id):
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN"
    }
    
    response = requests.delete(
        f"https://api.rememberizer.ai/api/v1/mementos/{memento_id}/",
        headers=headers
    )
    
    if response.status_code == 204:
        print("メメントが正常に削除されました")
    else:
        print("メメントの削除に失敗しました")

delete_memento(123)
```

{% hint style="info" %}
このAPIコールをテストするには、`YOUR_JWT_TOKEN`を実際のJWTトークンに、`123`を実際のメメントIDに置き換えてください。
{% endhint %}

{% endtabs %


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.rememberizer.ai/ja/rissu/api-docs/mementos.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
