openapi: 3.1.0 info: title: Honcho API summary: An API for adding personalization to AI Apps description: |- This API is used to store data and get insights about users for AI applications contact: name: Plastic Labs url: https://plasticlabs.ai/ email: hello@plasticlabs.ai version: 0.0.13 servers: - url: http://127.0.0.1:8000 description: Local Development Server - url: https:/demo.honcho.dev description: Demo Server paths: /v1/apps/{app_id}: get: tags: - apps summary: Get App description: |- Get an App by ID Args: app_id (str): The ID of the app Returns: schemas.App: App object operationId: get_app_v1_apps__app_id__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/App' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const app = await client.apps.get('app_id'); console.log(app.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) app = client.apps.get( "app_id", ) print(app.id) put: tags: - apps summary: Update App description: |- Update an App Args: app_id (str): The ID of the app to update app (schemas.AppUpdate): The App object containing any new metadata Returns: schemas.App: The App object of the updated App operationId: update_app_v1_apps__app_id__put security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AppUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/App' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const app = await client.apps.update('app_id'); console.log(app.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) app = client.apps.update( app_id="app_id", ) print(app.id) /v1/apps/name/{name}: get: tags: - apps summary: Get App By Name description: |- Get an App by Name Args: app_name (str): The name of the app Returns: schemas.App: App object operationId: get_app_by_name_v1_apps_name__name__get security: - HTTPBearer: [] - {} parameters: - name: name in: path required: true schema: type: string title: Name responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/App' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const app = await client.apps.getByName('name'); console.log(app.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) app = client.apps.get_by_name( "name", ) print(app.id) /v1/apps: post: tags: - apps summary: Create App description: |- Create an App Args: app (schemas.AppCreate): The App object containing any metadata Returns: schemas.App: Created App object operationId: create_app_v1_apps_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AppCreate' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/App' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] - {} x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const app = await client.apps.create({ name: 'name' }); console.log(app.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) app = client.apps.create( name="name", ) print(app.id) /v1/apps/get_or_create/{name}: get: tags: - apps summary: Get Or Create App description: |- Get or Create an App Args: app_name (str): The name of the app Returns: schemas.App: App object operationId: get_or_create_app_v1_apps_get_or_create__name__get security: - HTTPBearer: [] - {} parameters: - name: name in: path required: true schema: type: string title: Name responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/App' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const app = await client.apps.getOrCreate('name'); console.log(app.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) app = client.apps.get_or_create( "name", ) print(app.id) /v1/apps/{app_id}/users: post: tags: - users summary: Create User description: |- Create a User Args: app_id (str): The ID of the app representing the client application using honcho user (schemas.UserCreate): The User object containing any metadata Returns: schemas.User: Created User object operationId: create_user_v1_apps__app_id__users_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const user = await client.apps.users.create('app_id', { name: 'name' }); console.log(user.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) user = client.apps.users.create( app_id="app_id", name="name", ) print(user.id) /v1/apps/{app_id}/users/list: post: tags: - users summary: Get Users description: |- Get All Users for an App Args: app_id (str): The ID of the app representing the client application using honcho Returns: list[schemas.User]: List of User objects operationId: get_users_v1_apps__app_id__users_list_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: reverse in: query required: false schema: type: boolean default: false title: Reverse - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserGet' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_User_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { // Automatically fetches more pages as needed. for await (const user of client.apps.users.list('app_id')) { console.log(user.id); } } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) page = client.apps.users.list( app_id="app_id", ) page = page.items[0] print(page.id) /v1/apps/{app_id}/users/name/{name}: get: tags: - users summary: Get User By Name description: |- Get a User Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user Returns: schemas.User: User object operationId: get_user_by_name_v1_apps__app_id__users_name__name__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: name in: path required: true schema: type: string title: Name responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const user = await client.apps.users.getByName('app_id', 'name'); console.log(user.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) user = client.apps.users.get_by_name( name="name", app_id="app_id", ) print(user.id) /v1/apps/{app_id}/users/{user_id}: get: tags: - users summary: Get User description: |- Get a User Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user Returns: schemas.User: User object operationId: get_user_v1_apps__app_id__users__user_id__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const user = await client.apps.users.get('app_id', 'user_id'); console.log(user.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) user = client.apps.users.get( user_id="user_id", app_id="app_id", ) print(user.id) put: tags: - users summary: Update User description: |- Update a User Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user user (schemas.UserCreate): The User object containing any metadata Returns: schemas.User: Updated User object operationId: update_user_v1_apps__app_id__users__user_id__put security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const user = await client.apps.users.update('app_id', 'user_id'); console.log(user.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) user = client.apps.users.update( user_id="user_id", app_id="app_id", ) print(user.id) /v1/apps/{app_id}/users/get_or_create/{name}: get: tags: - users summary: Get Or Create User description: |- Get or Create a User Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user Returns: schemas.User: User object operationId: get_or_create_user_v1_apps__app_id__users_get_or_create__name__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: name in: path required: true schema: type: string title: Name responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const user = await client.apps.users.getOrCreate('app_id', 'name'); console.log(user.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) user = client.apps.users.get_or_create( name="name", app_id="app_id", ) print(user.id) /v1/apps/{app_id}/users/{user_id}/sessions/list: post: tags: - sessions summary: Get Sessions description: |- Get All Sessions for a User Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user Returns: list[schemas.Session]: List of Session objects operationId: get_sessions_v1_apps__app_id__users__user_id__sessions_list_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: reverse in: query required: false schema: anyOf: - type: boolean - type: 'null' default: false title: Reverse - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionGet' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_Session_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { // Automatically fetches more pages as needed. for await (const session of client.apps.users.sessions.list('app_id', 'user_id')) { console.log(session.id); } } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) page = client.apps.users.sessions.list( user_id="user_id", app_id="app_id", ) page = page.items[0] print(page.id) /v1/apps/{app_id}/users/{user_id}/sessions: post: tags: - sessions summary: Create Session description: |- Create a Session for a User Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session (schemas.SessionCreate): The Session object containing any metadata Returns: schemas.Session: The Session object of the new Session operationId: create_session_v1_apps__app_id__users__user_id__sessions_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Session' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const session = await client.apps.users.sessions.create('app_id', 'user_id'); console.log(session.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) session = client.apps.users.sessions.create( user_id="user_id", app_id="app_id", ) print(session.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}: put: tags: - sessions summary: Update Session description: |- Update the metadata of a Session Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (str): The ID of the Session to update session (schemas.SessionUpdate): The Session object containing any new metadata Returns: schemas.Session: The Session object of the updated Session operationId: update_session_v1_apps__app_id__users__user_id__sessions__session_id__put security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Session' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const session = await client.apps.users.sessions.update('app_id', 'user_id', 'session_id'); console.log(session.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) session = client.apps.users.sessions.update( session_id="session_id", app_id="app_id", user_id="user_id", ) print(session.id) delete: tags: - sessions summary: Delete Session description: |- Delete a session by marking it as inactive Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (str): The ID of the Session to delete Returns: dict: A message indicating that the session was deleted Raises: HTTPException: If the session is not found operationId: delete_session_v1_apps__app_id__users__user_id__sessions__session_id__delete security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const session = await client.apps.users.sessions.delete('app_id', 'user_id', 'session_id'); console.log(session); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) session = client.apps.users.sessions.delete( session_id="session_id", app_id="app_id", user_id="user_id", ) print(session) get: tags: - sessions summary: Get Session description: |- Get a specific session for a user by ID Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (str): The ID of the Session to retrieve Returns: schemas.Session: The Session object of the requested Session Raises: HTTPException: If the session is not found operationId: get_session_v1_apps__app_id__users__user_id__sessions__session_id__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Session' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const session = await client.apps.users.sessions.get('app_id', 'user_id', 'session_id'); console.log(session.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) session = client.apps.users.sessions.get( session_id="session_id", app_id="app_id", user_id="user_id", ) print(session.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat: post: tags: - sessions summary: Chat operationId: chat_v1_apps__app_id__users__user_id__sessions__session_id__chat_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AgentQuery' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentChat' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const agentChat = await client.apps.users.sessions.chat('app_id', 'user_id', 'session_id', { queries: 'string', }); console.log(agentChat.content); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) agent_chat = client.apps.users.sessions.chat( session_id="session_id", app_id="app_id", user_id="user_id", queries="string", ) print(agent_chat.content) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat/stream: post: tags: - sessions summary: Get Chat Stream operationId: get_chat_stream_v1_apps__app_id__users__user_id__sessions__session_id__chat_stream_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AgentQuery' responses: '200': description: Chat stream content: application/json: schema: {} text/event-stream: schema: type: string format: binary '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const response = await client.apps.users.sessions.stream('app_id', 'user_id', 'session_id', { queries: 'string', }); console.log(response); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) response = client.apps.users.sessions.stream( session_id="session_id", app_id="app_id", user_id="user_id", queries="string", ) print(response) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/clone: get: tags: - sessions summary: Clone Session operationId: clone_session_v1_apps__app_id__users__user_id__sessions__session_id__clone_get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id - name: message_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Message Id - name: deep_copy in: query required: false schema: type: boolean default: false title: Deep Copy responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Session' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const session = await client.apps.users.sessions.clone('app_id', 'user_id', 'session_id'); console.log(session.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) session = client.apps.users.sessions.clone( session_id="session_id", app_id="app_id", user_id="user_id", ) print(session.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages: post: tags: - messages summary: Create Message For Session description: |- Adds a message to a session Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (int): The ID of the Session to add the message to message (schemas.MessageCreate): The Message object to add containing the message content and type Returns: schemas.Message: The Message object of the added message Raises: HTTPException: If the session is not found operationId: create_message_for_session_v1_apps__app_id__users__user_id__sessions__session_id__messages_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MessageCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Message' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const message = await client.apps.users.sessions.messages.create('app_id', 'user_id', 'session_id', { content: 'content', is_user: true, }); console.log(message.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) message = client.apps.users.sessions.messages.create( session_id="session_id", app_id="app_id", user_id="user_id", content="content", is_user=True, ) print(message.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/list: post: tags: - messages summary: Get Messages description: |- Get all messages for a session Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (int): The ID of the Session to retrieve reverse (bool): Whether to reverse the order of the messages Returns: list[schemas.Message]: List of Message objects Raises: HTTPException: If the session is not found operationId: get_messages_v1_apps__app_id__users__user_id__sessions__session_id__messages_list_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id - name: reverse in: query required: false schema: anyOf: - type: boolean - type: 'null' default: false title: Reverse - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MessageGet' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_Message_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { // Automatically fetches more pages as needed. for await (const message of client.apps.users.sessions.messages.list('app_id', 'user_id', 'session_id')) { console.log(message.id); } } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) page = client.apps.users.sessions.messages.list( session_id="session_id", app_id="app_id", user_id="user_id", ) page = page.items[0] print(page.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/messages/{message_id}: get: tags: - messages summary: Get Message operationId: get_message_v1_apps__app_id__users__user_id__sessions__session_id__messages__message_id__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id - name: message_id in: path required: true schema: type: string title: Message Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Message' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const message = await client.apps.users.sessions.messages.get( 'app_id', 'user_id', 'session_id', 'message_id', ); console.log(message.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) message = client.apps.users.sessions.messages.get( message_id="message_id", app_id="app_id", user_id="user_id", session_id="session_id", ) print(message.id) put: tags: - messages summary: Update Message description: Update's the metadata of a message operationId: update_message_v1_apps__app_id__users__user_id__sessions__session_id__messages__message_id__put security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id - name: message_id in: path required: true schema: type: string title: Message Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MessageUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Message' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const message = await client.apps.users.sessions.messages.update( 'app_id', 'user_id', 'session_id', 'message_id', ); console.log(message.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) message = client.apps.users.sessions.messages.update( message_id="message_id", app_id="app_id", user_id="user_id", session_id="session_id", ) print(message.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages: post: tags: - metamessages summary: Create Metamessage description: |- Adds a message to a session Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (int): The ID of the Session to add the message to metamessage (schemas.MeteamessageCreate): The metamessage creation object Returns: schemas.Metamessage: The Metamessage object of the added metamessage Raises: HTTPException: If the session is not found operationId: create_metamessage_v1_apps__app_id__users__user_id__sessions__session_id__metamessages_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MetamessageCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Metamessage' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const metamessage = await client.apps.users.sessions.metamessages.create( 'app_id', 'user_id', 'session_id', { content: 'content', message_id: 'message_id', metamessage_type: 'metamessage_type' }, ); console.log(metamessage.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) metamessage = client.apps.users.sessions.metamessages.create( session_id="session_id", app_id="app_id", user_id="user_id", content="content", message_id="message_id", metamessage_type="metamessage_type", ) print(metamessage.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/list: post: tags: - metamessages summary: Get Metamessages description: |- Get all messages for a session Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (int): The ID of the Session to retrieve reverse (bool): Whether to reverse the order of the metamessages Returns: list[schemas.Message]: List of Message objects Raises: HTTPException: If the session is not found operationId: get_metamessages_v1_apps__app_id__users__user_id__sessions__session_id__metamessages_list_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id - name: reverse in: query required: false schema: anyOf: - type: boolean - type: 'null' default: false title: Reverse - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MetamessageGet' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_Metamessage_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { // Automatically fetches more pages as needed. for await (const metamessage of client.apps.users.sessions.metamessages.list( 'app_id', 'user_id', 'session_id', )) { console.log(metamessage.id); } } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) page = client.apps.users.sessions.metamessages.list( session_id="session_id", app_id="app_id", user_id="user_id", ) page = page.items[0] print(page.id) /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/metamessages/{metamessage_id}: get: tags: - metamessages summary: Get Metamessage description: |- Get a specific Metamessage by ID Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user session_id (int): The ID of the Session to retrieve Returns: schemas.Session: The Session object of the requested Session Raises: HTTPException: If the session is not found operationId: >- get_metamessage_v1_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id - name: metamessage_id in: path required: true schema: type: string title: Metamessage Id - name: message_id in: query required: true schema: type: string title: Message Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Metamessage' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const metamessage = await client.apps.users.sessions.metamessages.get( 'app_id', 'user_id', 'session_id', 'metamessage_id', { message_id: 'message_id' }, ); console.log(metamessage.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) metamessage = client.apps.users.sessions.metamessages.get( metamessage_id="metamessage_id", app_id="app_id", user_id="user_id", session_id="session_id", message_id="message_id", ) print(metamessage.id) put: tags: - metamessages summary: Update Metamessage description: Update's the metadata of a metamessage operationId: >- update_metamessage_v1_apps__app_id__users__user_id__sessions__session_id__metamessages__metamessage_id__put security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: session_id in: path required: true schema: type: string title: Session Id - name: metamessage_id in: path required: true schema: type: string title: Metamessage Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MetamessageUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Metamessage' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const metamessage = await client.apps.users.sessions.metamessages.update( 'app_id', 'user_id', 'session_id', 'metamessage_id', { message_id: 'message_id' }, ); console.log(metamessage.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) metamessage = client.apps.users.sessions.metamessages.update( metamessage_id="metamessage_id", app_id="app_id", user_id="user_id", session_id="session_id", message_id="message_id", ) print(metamessage.id) /v1/apps/{app_id}/users/{user_id}/metamessages/list: post: tags: - metamessages summary: Get Metamessages By User description: |- Paginate through the user metamessages for a user Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user reverse (bool): Whether to reverse the order of the metamessages Returns: list[schemas.Message]: List of Message objects Raises: HTTPException: If the session is not found operationId: get_metamessages_by_user_v1_apps__app_id__users__user_id__metamessages_list_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: reverse in: query required: false schema: anyOf: - type: boolean - type: 'null' default: false title: Reverse - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MetamessageGetUserLevel' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_Metamessage_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { // Automatically fetches more pages as needed. for await (const metamessage of client.apps.users.metamessages.list('app_id', 'user_id')) { console.log(metamessage.id); } } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) page = client.apps.users.metamessages.list( user_id="user_id", app_id="app_id", ) page = page.items[0] print(page.id) /v1/apps/{app_id}/users/{user_id}/collections/list: post: tags: - collections summary: Get Collections description: |- Get All Collections for a User Args: app_id (str): The ID of the app representing the client application using honcho user_id (str): The User ID representing the user, managed by the user Returns: list[schemas.Collection]: List of Collection objects operationId: get_collections_v1_apps__app_id__users__user_id__collections_list_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: reverse in: query required: false schema: anyOf: - type: boolean - type: 'null' default: false title: Reverse - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CollectionGet' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_Collection_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { // Automatically fetches more pages as needed. for await (const collection of client.apps.users.collections.list('app_id', 'user_id')) { console.log(collection.id); } } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) page = client.apps.users.collections.list( user_id="user_id", app_id="app_id", ) page = page.items[0] print(page.id) /v1/apps/{app_id}/users/{user_id}/collections/name/{name}: get: tags: - collections summary: Get Collection By Name operationId: get_collection_by_name_v1_apps__app_id__users__user_id__collections_name__name__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: name in: path required: true schema: type: string title: Name responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Collection' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const collection = await client.apps.users.collections.getByName('app_id', 'user_id', 'name'); console.log(collection.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) collection = client.apps.users.collections.get_by_name( name="name", app_id="app_id", user_id="user_id", ) print(collection.id) /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}: get: tags: - collections summary: Get Collection By Id operationId: get_collection_by_id_v1_apps__app_id__users__user_id__collections__collection_id__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Collection' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const collection = await client.apps.users.collections.get('app_id', 'user_id', 'collection_id'); console.log(collection.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) collection = client.apps.users.collections.get( collection_id="collection_id", app_id="app_id", user_id="user_id", ) print(collection.id) put: tags: - collections summary: Update Collection operationId: update_collection_v1_apps__app_id__users__user_id__collections__collection_id__put security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CollectionUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Collection' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const collection = await client.apps.users.collections.update('app_id', 'user_id', 'collection_id'); console.log(collection.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) collection = client.apps.users.collections.update( collection_id="collection_id", app_id="app_id", user_id="user_id", ) print(collection.id) delete: tags: - collections summary: Delete Collection operationId: delete_collection_v1_apps__app_id__users__user_id__collections__collection_id__delete security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const collection = await client.apps.users.collections.delete('app_id', 'user_id', 'collection_id'); console.log(collection); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) collection = client.apps.users.collections.delete( collection_id="collection_id", app_id="app_id", user_id="user_id", ) print(collection) /v1/apps/{app_id}/users/{user_id}/collections: post: tags: - collections summary: Create Collection operationId: create_collection_v1_apps__app_id__users__user_id__collections_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CollectionCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Collection' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const collection = await client.apps.users.collections.create('app_id', 'user_id', { name: 'name' }); console.log(collection.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) collection = client.apps.users.collections.create( user_id="user_id", app_id="app_id", name="name", ) print(collection.id) /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/list: post: tags: - documents summary: Get Documents operationId: get_documents_v1_apps__app_id__users__user_id__collections__collection_id__documents_list_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id - name: reverse in: query required: false schema: anyOf: - type: boolean - type: 'null' default: false title: Reverse - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DocumentGet' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_Document_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { // Automatically fetches more pages as needed. for await (const document of client.apps.users.collections.documents.list( 'app_id', 'user_id', 'collection_id', )) { console.log(document.id); } } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) page = client.apps.users.collections.documents.list( collection_id="collection_id", app_id="app_id", user_id="user_id", ) page = page.items[0] print(page.id) /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/{document_id}: get: tags: - documents summary: Get Document operationId: get_document_v1_apps__app_id__users__user_id__collections__collection_id__documents__document_id__get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id - name: document_id in: path required: true schema: type: string title: Document Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Document' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const document = await client.apps.users.collections.documents.get( 'app_id', 'user_id', 'collection_id', 'document_id', ); console.log(document.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) document = client.apps.users.collections.documents.get( document_id="document_id", app_id="app_id", user_id="user_id", collection_id="collection_id", ) print(document.id) put: tags: - documents summary: Update Document operationId: >- update_document_v1_apps__app_id__users__user_id__collections__collection_id__documents__document_id__put security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id - name: document_id in: path required: true schema: type: string title: Document Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DocumentUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Document' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const document = await client.apps.users.collections.documents.update( 'app_id', 'user_id', 'collection_id', 'document_id', ); console.log(document.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) document = client.apps.users.collections.documents.update( document_id="document_id", app_id="app_id", user_id="user_id", collection_id="collection_id", ) print(document.id) delete: tags: - documents summary: Delete Document operationId: >- delete_document_v1_apps__app_id__users__user_id__collections__collection_id__documents__document_id__delete security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id - name: document_id in: path required: true schema: type: string title: Document Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const document = await client.apps.users.collections.documents.delete( 'app_id', 'user_id', 'collection_id', 'document_id', ); console.log(document); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) document = client.apps.users.collections.documents.delete( document_id="document_id", app_id="app_id", user_id="user_id", collection_id="collection_id", ) print(document) /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents/query: get: tags: - documents summary: Query Documents operationId: query_documents_v1_apps__app_id__users__user_id__collections__collection_id__documents_query_get security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id - name: query in: query required: true schema: type: string title: Query - name: top_k in: query required: false schema: type: integer default: 5 title: Top K - name: filter in: query required: false schema: anyOf: - type: string - type: 'null' title: Filter responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Document' title: >- Response Query Documents V1 Apps App Id Users User Id Collections Collection Id Documents Query Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const documents = await client.apps.users.collections.documents.query( 'app_id', 'user_id', 'collection_id', { query: 'query' }, ); console.log(documents); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) documents = client.apps.users.collections.documents.query( collection_id="collection_id", app_id="app_id", user_id="user_id", query="query", ) print(documents) /v1/apps/{app_id}/users/{user_id}/collections/{collection_id}/documents: post: tags: - documents summary: Create Document operationId: create_document_v1_apps__app_id__users__user_id__collections__collection_id__documents_post security: - HTTPBearer: [] - {} parameters: - name: app_id in: path required: true schema: type: string title: App Id - name: user_id in: path required: true schema: type: string title: User Id - name: collection_id in: path required: true schema: type: string title: Collection Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DocumentCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Document' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-codeSamples: - lang: JavaScript source: |- import Honcho from 'honcho'; const client = new Honcho({ apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted }); async function main() { const document = await client.apps.users.collections.documents.create( 'app_id', 'user_id', 'collection_id', { content: 'content' }, ); console.log(document.id); } main(); - lang: Python source: |- import os from honcho import Honcho client = Honcho( # This is the default and can be omitted api_key=os.environ.get("HONCHO_API_KEY"), ) document = client.apps.users.collections.documents.create( collection_id="collection_id", app_id="app_id", user_id="user_id", content="content", ) print(document.id) components: schemas: AgentChat: properties: content: type: string title: Content type: object required: - content title: AgentChat AgentQuery: properties: queries: anyOf: - type: string - items: type: string type: array title: Queries type: object required: - queries title: AgentQuery App: properties: id: type: string title: Id name: type: string title: Name metadata: type: object title: Metadata additionalProperties: true created_at: type: string format: date-time title: Created At type: object required: - id - name - metadata - created_at title: App exclude: - h_metadata - public_id AppCreate: properties: name: type: string title: Name metadata: type: object title: Metadata default: {} additionalProperties: true type: object required: - name title: AppCreate AppUpdate: properties: name: anyOf: - type: string - type: 'null' title: Name metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata type: object title: AppUpdate Collection: properties: id: type: string title: Id name: type: string title: Name user_id: type: string title: User Id metadata: type: object title: Metadata additionalProperties: true created_at: type: string format: date-time title: Created At type: object required: - id - name - user_id - metadata - created_at title: Collection exclude: - h_metadata - public_id CollectionCreate: properties: name: type: string title: Name metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata default: {} type: object required: - name title: CollectionCreate CollectionGet: properties: filter: anyOf: - type: object additionalProperties: true - type: 'null' title: Filter type: object title: CollectionGet CollectionUpdate: properties: name: anyOf: - type: string - type: 'null' title: Name metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata type: object title: CollectionUpdate Document: properties: id: type: string title: Id content: type: string title: Content metadata: type: object title: Metadata additionalProperties: true created_at: type: string format: date-time title: Created At collection_id: type: string title: Collection Id type: object required: - id - content - metadata - created_at - collection_id title: Document exclude: - h_metadata - public_id DocumentCreate: properties: content: type: string title: Content metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata default: {} type: object required: - content title: DocumentCreate DocumentGet: properties: filter: anyOf: - type: object additionalProperties: true - type: 'null' title: Filter type: object title: DocumentGet DocumentUpdate: properties: metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata content: anyOf: - type: string - type: 'null' title: Content type: object title: DocumentUpdate HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError Message: properties: id: type: string title: Id content: type: string title: Content is_user: type: boolean title: Is User session_id: type: string title: Session Id metadata: type: object title: Metadata additionalProperties: true created_at: type: string format: date-time title: Created At type: object required: - id - content - is_user - session_id - metadata - created_at title: Message exclude: - h_metadata - public_id MessageCreate: properties: content: type: string title: Content is_user: type: boolean title: Is User metadata: type: object title: Metadata default: {} additionalProperties: true type: object required: - content - is_user title: MessageCreate MessageGet: properties: filter: anyOf: - type: object additionalProperties: true - type: 'null' title: Filter type: object title: MessageGet MessageUpdate: properties: metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata type: object title: MessageUpdate Metamessage: properties: id: type: string title: Id metamessage_type: type: string title: Metamessage Type content: type: string title: Content message_id: type: string title: Message Id metadata: type: object title: Metadata additionalProperties: true created_at: type: string format: date-time title: Created At type: object required: - id - metamessage_type - content - message_id - metadata - created_at title: Metamessage exclude: - h_metadata - public_id MetamessageCreate: properties: metamessage_type: type: string title: Metamessage Type content: type: string title: Content message_id: type: string title: Message Id metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata default: {} type: object required: - metamessage_type - content - message_id title: MetamessageCreate MetamessageGet: properties: metamessage_type: anyOf: - type: string - type: 'null' title: Metamessage Type message_id: anyOf: - type: string - type: 'null' title: Message Id filter: anyOf: - type: object additionalProperties: true - type: 'null' title: Filter type: object title: MetamessageGet MetamessageGetUserLevel: properties: filter: anyOf: - type: object additionalProperties: true - type: 'null' title: Filter metamessage_type: anyOf: - type: string - type: 'null' title: Metamessage Type type: object title: MetamessageGetUserLevel MetamessageUpdate: properties: message_id: type: string title: Message Id metamessage_type: anyOf: - type: string - type: 'null' title: Metamessage Type metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata type: object required: - message_id title: MetamessageUpdate Page_Collection_: properties: items: items: $ref: '#/components/schemas/Collection' type: array title: Items total: type: integer minimum: 0 title: Total page: type: integer minimum: 1 title: Page size: type: integer minimum: 1 title: Size pages: type: integer minimum: 0 title: Pages type: object required: - items - total - page - size title: Page[Collection] Page_Document_: properties: items: items: $ref: '#/components/schemas/Document' type: array title: Items total: type: integer minimum: 0 title: Total page: type: integer minimum: 1 title: Page size: type: integer minimum: 1 title: Size pages: type: integer minimum: 0 title: Pages type: object required: - items - total - page - size title: Page[Document] Page_Message_: properties: items: items: $ref: '#/components/schemas/Message' type: array title: Items total: type: integer minimum: 0 title: Total page: type: integer minimum: 1 title: Page size: type: integer minimum: 1 title: Size pages: type: integer minimum: 0 title: Pages type: object required: - items - total - page - size title: Page[Message] Page_Metamessage_: properties: items: items: $ref: '#/components/schemas/Metamessage' type: array title: Items total: type: integer minimum: 0 title: Total page: type: integer minimum: 1 title: Page size: type: integer minimum: 1 title: Size pages: type: integer minimum: 0 title: Pages type: object required: - items - total - page - size title: Page[Metamessage] Page_Session_: properties: items: items: $ref: '#/components/schemas/Session' type: array title: Items total: type: integer minimum: 0 title: Total page: type: integer minimum: 1 title: Page size: type: integer minimum: 1 title: Size pages: type: integer minimum: 0 title: Pages type: object required: - items - total - page - size title: Page[Session] Page_User_: properties: items: items: $ref: '#/components/schemas/User' type: array title: Items total: type: integer minimum: 0 title: Total page: type: integer minimum: 1 title: Page size: type: integer minimum: 1 title: Size pages: type: integer minimum: 0 title: Pages type: object required: - items - total - page - size title: Page[User] Session: properties: id: type: string title: Id is_active: type: boolean title: Is Active user_id: type: string title: User Id metadata: type: object title: Metadata additionalProperties: true created_at: type: string format: date-time title: Created At type: object required: - id - is_active - user_id - metadata - created_at title: Session exclude: - h_metadata - public_id SessionCreate: properties: metadata: type: object title: Metadata default: {} additionalProperties: true type: object title: SessionCreate SessionGet: properties: filter: anyOf: - type: object additionalProperties: true - type: 'null' title: Filter is_active: type: boolean title: Is Active default: false type: object title: SessionGet SessionUpdate: properties: metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata type: object title: SessionUpdate User: properties: id: type: string title: Id name: type: string title: Name app_id: type: string title: App Id created_at: type: string format: date-time title: Created At metadata: type: object title: Metadata additionalProperties: true type: object required: - id - name - app_id - created_at - metadata title: User exclude: - h_metadata - public_id UserCreate: properties: name: type: string title: Name metadata: type: object title: Metadata default: {} additionalProperties: true type: object required: - name title: UserCreate UserGet: properties: filter: anyOf: - type: object additionalProperties: true - type: 'null' title: Filter type: object title: UserGet UserUpdate: properties: name: anyOf: - type: string - type: 'null' title: Name metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata type: object title: UserUpdate ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError securitySchemes: HTTPBearer: type: http scheme: bearer