# Ax Library > Ax Library is a community library for Axis network cameras and devices: proofs of concept, GitHub projects, example apps, products, articles and resources, added by the people who make them. This file tells an AI assistant how to add and maintain listings for a member through the JSON API. ## How to add someone's work 1. Ask the person for their API token if you do not have it. They make one at https://ax-library.com/me under "API tokens". It starts with axl_. Never print the token back or put it anywhere except the Authorization header. 2. Read what they want to add (their GitHub repository, product page or article) and work out the fields below. Use only facts you found there; do not invent versions, licences, prices or features. Leave optional fields out when you do not know them. 3. Check GET https://ax-library.com/api/v1/me to see their listings, so you do not add something twice. If it is already there, change it with PATCH instead. 4. Show the person the listing you are about to send, and send it when they agree. 5. POST https://ax-library.com/api/v1/listings with the JSON. On status 422 the answer says per field what to fix; fix it and send again. 6. Tell the person the "url" and the "status" from the answer. Status pending means an admin checks it first: the first listing of every member is checked, and so is anything with origin community. That is normal; do not retry. ## Requests Base address: https://ax-library.com Send and expect JSON (Content-Type: application/json). Reading needs no token. Adding, changing and removing needs the header: Authorization: Bearer axl_… - GET /api/v1/schema: Every field, the listing types it belongs to and the values it accepts - GET /api/v1/listings: Search published listings: q, type, category, kind, pricing, sort (updated, popular, rated; newest first when left out), limit, offset - GET /api/v1/listings/{slug}: One listing - GET /api/v1/me (token): Who the token belongs to, who they may publish for, and all their listings with status - POST /api/v1/listings (token): Add a listing - PATCH /api/v1/listings/{slug} (token): Change a listing: send only the fields that change - DELETE /api/v1/listings/{slug} (token): Remove a listing A listing is addressed by its "slug", which the server makes from the title when the listing is added. ## Choosing the type - project: open or personal work. A GitHub project, a proof of concept, an example app, a library. Most things members add are projects. - product: something a company sells or offers. - article: a blog post, tutorial or write-up. Either put its whole text in description (Markdown, up to 40000 characters) and leave link out, or give the link to where it is published, or both. - resource: a tool, recipe, video, documentation, library or sample code that is not a full project. For a proof of concept use type project with maturity "proof of concept". For an app that runs on the camera use kind "acap". ## Fields - type (text, required): one of "product", "project", "article", "resource". What you are adding. Cannot be changed later. product = something sold or offered by a company; project = open or personal work such as a GitHub project, a proof of concept or an example app; article = a blog post or write-up; resource = a tool, recipe, video, documentation, library or sample code. - title (text, required): At most 80 characters. - summary (text, required): One sentence, at most 160 characters. Say what it does, without marketing words. - description (text): Up to 6000 characters (40000 for an article, which can be written here in full) of simple Markdown: paragraphs, **bold**, *italic*, `code`, fenced code blocks, lists, quotes, ### headings and https links. No HTML, no images, no tables. - category (text, required): one of "Video & recordings", "Analytics & AI", "Automation & integrations", "Monitoring & telemetry", "Remote access & networking", "Device management", "Security & hardening", "Developer tools", "General". - tags (list): Up to 8 short lower-case tags. - link (text): Where people get it or read it: the GitHub repository, product page or article. Must start with https://. Required, except for an article whose whole text is in description. - repo (text): Address of the source code, when link points somewhere else. - publisher (text): Who publishes it: your own id (the default) or the id of an organization you publish for. GET /api/v1/me lists them. - origin (text): one of "own", "community". own (default) = the token's owner made it. community = someone else made it; then original_author is required, and the listing is always checked by an admin. - original_author (text): Who made it, when origin is community. - kind (text, required, only for type product and project): one of "acap", "desktop", "server", "web", "mobile", "integration", "library", "hardware". What kind of thing it is. acap = an app that runs on the camera. - pricing (text, only for type product and project): one of "open source", "free", "freemium", "paid". Default: open source. - license (text, only for type product and project): For example MIT, Apache-2.0, or a price such as "From 149 EUR per camera". - version (text, only for type product and project): Latest version, as text: "1.4.0". - maturity (text, only for type product and project): one of "stable", "beta", "experimental", "proof of concept". Default: stable. Use proof of concept for a demo or experiment that is not meant for production. - setup (text, only for type product and project): one of "easy", "advanced". How hard it is to install. Default: easy. - platforms (list, only for type product and project): any of "Windows", "Linux", "macOS", "Docker", "Android", "iOS". Where it runs. Not used for kind acap. - requires (text, only for type product and project): Other requirements in a few words, at most 120 characters. Not used for kind acap. - axis_os_min (text, only for type product and project): Oldest AXIS OS version it runs on, such as "11.0". Only for kind acap. - axis_os_max (text, only for type product and project): Newest AXIS OS version it runs on. Only for kind acap. - architectures (list, only for type product and project): any of "aarch64", "armv7hf". Processor types it is built for. Only for kind acap. - needs_root (bool, only for type product and project): true when the app needs root access on the camera. Only for kind acap. - install_steps (list, only for type product and project): Install steps, one short sentence each. - faq (faq, only for type product and project): Questions and answers: a list of objects with "question" and "answer". - author (text, only for type article): Who wrote it. - kind (text, only for type resource): one of "tool", "recipe", "video", "documentation", "library", "sample", "other". Default: tool. Fields the server sets and you cannot send: slug, url, status, likes, reviews, rating, created, updated. Pictures cannot be added through the API yet. ## Example POST https://ax-library.com/api/v1/listings Authorization: Bearer axl_… Content-Type: application/json { "type": "project", "kind": "acap", "title": "Door counter", "summary": "Counts people passing a door and publishes the number over MQTT.", "description": "A small proof of concept.\n\n### How it works\n\n- Reads the analytics metadata stream\n- Publishes a count every minute", "category": "Analytics & AI", "tags": ["mqtt", "people counting"], "link": "https://github.com/example/door-counter", "pricing": "open source", "license": "MIT", "maturity": "proof of concept", "architectures": ["aarch64"] } The answer (status 201) is the saved listing, with its slug, url and status. ## Rules - Add only the member's own work with origin own. For someone else's work use origin community and name the maker in original_author. - Write plainly: what it is, what it does, what it needs. No marketing language, no claims you cannot back from the source. - A member can add 20 listings per day. Status 429 means that limit is reached. - Status 401: the token is missing, wrong or revoked. Ask the person for a new one. Status 403: the listing belongs to someone else. Status 404: no such listing. - Ax Library is an independent community site and is not affiliated with Axis Communications AB.