diff --git a/docs/openapi.json b/docs/openapi.json index 94819936..d515c490 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -101,7 +101,7 @@ "schema": { "type": "string" }, - "description": "Filter entities by organization name" + "description": "Filter entities by organization name. Will be deprecated soon, use `org_id` instead." }, { "name": "project_name", @@ -109,7 +109,23 @@ "schema": { "type": "string" }, - "description": "Filter entities by project name" + "description": "Filter entities by project name. Will be deprecated soon, use `project_id` instead." + }, + { + "name": "org_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter entities by organization ID." + }, + { + "name": "project_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter entities by project ID." } ], "responses": { @@ -443,7 +459,7 @@ "schema": { "type": "string" }, - "description": "Filter memories by organization name" + "description": "Filter memories by organization name. Will be deprecated soon, use `org_id` instead." }, { "name": "project_name", @@ -451,7 +467,23 @@ "schema": { "type": "string" }, - "description": "Filter memories by project name" + "description": "Filter memories by project name. Will be deprecated soon, use `project_id` instead." + }, + { + "name": "org_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter memories by organization ID." + }, + { + "name": "project_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter memories by project ID." }, { "name":"keywords", @@ -668,19 +700,19 @@ }, { "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/ \\\n --header 'Authorization: ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"messages\": [\n {}\n ],\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"includes\": \"\",\n \"excludes\": \"\",\n \"infer\": true,\n \"custom_categories\": {},\n \"org_name\": \"\",\n \"project_name\": \"\"\n}'" + "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/ \\\n --header 'Authorization: ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"messages\": [\n {}\n ],\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"includes\": \"\",\n \"excludes\": \"\",\n \"infer\": true,\n \"custom_categories\": {},\n \"org_name\": \"\",\n \"project_name\": \"\", \n \"org_id\": \"\",\n \"project_id\": \"\"\n}'" }, { "lang": "Go", - "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}" + "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\", \n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}" }, { "lang": "PHP", - "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}" + "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\", \n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}" }, { "lang": "Java", - "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\"\n}\")\n .asString();" + "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\", \n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\"\n}\")\n .asString();" } ], "x-codegen-request-body-name": "data" @@ -740,7 +772,7 @@ "schema": { "type": "string" }, - "description": "Filter memories by organization name" + "description": "Filter memories by organization name. Will be deprecated soon, use `org_id` instead." }, { "name": "project_name", @@ -748,7 +780,23 @@ "schema": { "type": "string" }, - "description": "Filter memories by project name" + "description": "Filter memories by project name. Will be deprecated soon, use `project_id` instead." + }, + { + "name": "org_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter memories by organization ID." + }, + { + "name": "project_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter memories by project ID." } ], "responses": { @@ -822,7 +870,7 @@ "schema": { "type": "string" }, - "description": "Filter memories by organization name" + "description": "Filter memories by organization name. Will be deprecated soon, use `org_id` instead." }, { "name": "project_name", @@ -830,7 +878,23 @@ "schema": { "type": "string" }, - "description": "Filter memories by project name" + "description": "Filter memories by project name. Will be deprecated soon, use `project_id` instead." + }, + { + "name": "org_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter memories by organization ID." + }, + { + "name": "project_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter memories by project ID." }, { "name": "page", @@ -1094,7 +1158,7 @@ }, { "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/search/ \\\n --header 'Authorization: ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_name\": \"\",\n \"project_name\": \"\"\n}'" + "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/search/ \\\n --header 'Authorization: ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_name\": \"\",\n \"project_name\": \"\", \n \"org_id\": \"\",\n \"project_id\": \"\"\n}'" }, { "lang": "Go", @@ -1223,19 +1287,19 @@ }, { "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/v2/memories/search/ \\\n --header 'Authorization: ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"filters\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_name\": \"\",\n \"project_name\": \"\"\n}'" + "source": "curl --request POST \\\n --url https://api.mem0.ai/v2/memories/search/ \\\n --header 'Authorization: ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"filters\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_name\": \"\",\n \"project_name\": \"\",\n \"org_id\": \"\",\n \"project_id\": \"\"\n}'" }, { "lang": "Go", - "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v2/memories/search/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}" + "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v2/memories/search/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\",\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}" }, { "lang": "PHP", - "source": " \"https://api.mem0.ai/v2/memories/search/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}" + "source": " \"https://api.mem0.ai/v2/memories/search/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\",\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}" }, { "lang": "Java", - "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v2/memories/search/\")\n .header(\"Authorization\", \"\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\"\n}\")\n .asString();" + "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v2/memories/search/\")\n .header(\"Authorization\", \"\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_name\\\": \\\"\\\",\n \\\"project_name\\\": \\\"\\\",\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\")\n .asString();" } ], "x-codegen-request-body-name": "data" @@ -3888,16 +3952,28 @@ "nullable": true }, "org_name": { - "description": "The name of the organization associated with this memory.", + "description": "The name of the organization associated with this memory. Will be deprecated soon use `org_id` instead.", "title": "Organization name", "type": "string", "nullable": true }, "project_name": { - "description": "The name of the project associated with this memory.", + "description": "The name of the project associated with this memory. Will be deprecated soon use project_id instead.", "title": "Project name", "type": "string", "nullable": true + }, + "org_id": { + "description": "The unique identifier of the organization associated with this memory.", + "title": "Organization id", + "type": "string", + "nullable": true + }, + "project_id": { + "description": "The unique identifier of the project associated with this memory.", + "title": "Project id", + "type": "string", + "nullable": true } } }, @@ -3976,13 +4052,25 @@ "title": "Organization Name", "type": "string", "nullable": true, - "description": "The name of the organization associated with the memory." + "description": "The name of the organization associated with the memory. Will be deprecated soon use `org_id` instead." }, "project_name": { "title": "Project Name", "type": "string", "nullable": true, - "description": "The name of the project associated with the memory." + "description": "The name of the project associated with the memory. Will be deprecated soon use project_id instead." + }, + "org_id": { + "title": "Organization id", + "type": "string", + "nullable": true, + "description": "The unique identifier of the organization associated with the memory." + }, + "project_id": { + "title": "Project id", + "type": "string", + "nullable": true, + "description": "The unique identifier of the project associated with the memory." } } }, @@ -4030,13 +4118,25 @@ "title": "Organization Name", "type": "string", "nullable": true, - "description": "The name of the organization associated with the memory." + "description": "The name of the organization associated with the memory. Will be deprecated soon use `org_id` instead." }, "project_name": { "title": "Project Name", "type": "string", "nullable": true, - "description": "The name of the project associated with the memory." + "description": "The name of the project associated with the memory. Will be deprecated soon use `project_id` instead." + }, + "org_id": { + "title": "Organization id", + "type": "string", + "nullable": true, + "description": "The unique identifier of the organization associated with the memory." + }, + "project_id": { + "title": "Project id", + "type": "string", + "nullable": true, + "description": "The unique identifier of the project associated with the memory." } } },