Profile

Get Profile Template

Return the full structure and summary of a Profile template. Use instance_count to understand the template's scope of impact; read instance field values via the memory query APIs.

POST
/
get
/
profile_template
import os
import requests
import json

# Replace with your API Key
os.environ["MEMOS_API_KEY"] = "YOUR_API_KEY"
os.environ["MEMOS_BASE_URL"] = "https://memos.memtensor.cn/api/openmem/v1"

data = {
  "profile_template_id": "tpl_user_001"
}
headers = {
  "Content-Type": "application/json",
  "Authorization": f"Token {os.environ['MEMOS_API_KEY']}"
}
url = f"{os.environ['MEMOS_BASE_URL']}/get/profile_template"

res = requests.post(url=url, headers=headers, data=json.dumps(data))

print(f"result: {res.json()}")
{
  "code": 0,
  "data": {
    "profile_template": {
      "profile_template_id": "<string>",
      "name": "<string>",
      "project_id": "<string>",
      "metadata": {
        "{category name}": {
          "{field name}": {
            "value": "<string>",
            "algorithm_updatable": true
          }
        }
      },
      "instance_count": 0,
      "create_time": "<string>",
      "update_time": "<string>"
    }
  },
  "message": "ok"
}

Authorizations

Authorization
string
header
required

Token API_key, available in API Console > API Keys

Body

application/json
profile_template_id
string
required
ID of a template in the current project.

Response

application/json

Successful Response

code
number

API status code.

Example: 0
data
object
Show child attributes
message
string

API response message.

Example: "ok"