Back to .md Directory

API documentation

Documents HTTP API endpoints for programmatic access to an archivy knowledge base, including authentication, search, folders, notes, and bookmarks.

May 2, 2026
0 downloads
1 views
ai
View source

What this file does

Documents HTTP API endpoints for programmatic access to an archivy knowledge base, including authentication, search, folders, notes, and bookmarks.

When to use it

  • Integrating archivy with external scripts or automation tools
  • Building a custom client or CLI for archivy
  • Understanding available API routes before writing code against archivy
  • Learning how to authenticate and make requests to archivy

Assumes this stack

PythonrequestsHTTPElasticsearch

API documentation

The archivy api allows you to interact with your archivy instance through HTTP. This allows a complete, programmatic access to the archivy's functionality.

All these requests must be made by an authenticated user. For example, using the python requests module:

import requests
# we create a new session that will allow us to login once
s = requests.session()

INSTANCE_URL = <your instance url>
s.post(f"{INSTANCE_URL}/api/login", auth=(<username>, <password>))

# once you've logged in - you can make authenticated requests to the api, like:
resp = s.get(f"{INSTANCE_URL}/api/dataobjs").content)

API spec

This is an api specification for the routes you might find useful in your scripts. The url prefix for all the requests is /api.

General routes

Route nameParametersDescription
POST /loginHTTP Basic Auth: username and passwordLogs you in with your archivy username and password
GET /searchquery: search queryFetches elasticsearch results for your search terms.

Folders

Route nameParametersDescription
POST /folders/newpath: path of new directory For example, if you want to create the directory trees in the existing directory nature, path = "nature/trees"Allows you to create new directories
DELETE /folders/deletepath: path of directory to delete. For example, if you want to delete the trees dir in nature, path = natures/treesDeletes existing directories. Also works if the directories contain data, which will be deleted with it.

Dataobjs

Route nameParametersDescription
POST /notestitle, content, desc, tags: array of tags to associate with the note, path: string with the relative dir in which the note should be stored.Creates a new note in the knowledge base. The only required parameter is the title of the note.
POST /bookmarksurl, desc, tags: array of tags to associate with the bookmark, path: string with the relative dir in which the note should be stored.Stores a new bookmark. Only required parameter is url.
GET /dataobjsReturns an array of all dataobjs with their title, id, contents, url, path etc... This request is resource-heavy so we might need to consider not sending the large contents.
GET /dataobjs/idReturns data for one dataobj, specified by his id.
DELETE /dataobjs/idDeletes specified dataobj.

What's inside

4 route tables (general, folders, dataobjs), 1 code example, 1 authentication note, 11 endpoints documented

Change this for your project

  • Replace <your instance url> with your actual archivy instance URL
  • Replace <username> and <password> with your archivy credentials
  • Replace natures/trees in the DELETE /folders/delete example with a valid path

Where it goes

Keep in docs/ or alongside the feature. Agents read it to implement against a defined contract.

Worth borrowing

  • Using HTTP Basic Auth with session persistence for API calls
  • Organizing API docs by resource type (folders, dataobjs) for clarity

Related Documents