# API Maker Documentation

> Learn API Maker step by step - install it, connect a database, get REST APIs for every table, add your own TypeScript logic, secure it with tokens and groups, and deploy with Git.

Source: https://docs.apimaker.dev/index.html

<i></i> API Maker v3.3.0 · The framework for AI era
    <h1 class="am-hero__title">Connect a database. Get every API. Add your logic.</h1>
    <p class="am-hero__lead">API Maker connects to your databases and gives every table secure REST APIs at once : 17 per MongoDB collection, 14 per SQL table. You add your own TypeScript in custom APIs, hooks, schedulers and events. Caching, access control, logging, monitoring and Git deployment are built in, and it all runs on your own servers.</p>
    
        <a class="am-btn am-btn--primary" href="/v1/docs/getting-started/first-api.html">Your first API in 10 minutes</a>
        <a class="am-btn" href="/v1/docs/getting-started/install-on-server.html">Install on a server</a>
        <a class="am-btn" href="/v1/docs/getting-started/local-run.html">Run on your computer</a>
        <a class="am-btn" href="/v1/docs/getting-started/how-it-works.html">How it works</a>
    

## Start here

<ol class="am-steps">
<li><strong>Install API Maker</strong> On a blank Ubuntu server, one command installs everything : <a href="/v1/docs/getting-started/install-on-server.html">Install on a server</a>. On your laptop, the <a href="/v1/docs/getting-started/local-run.html">API Maker Local Run</a> desktop app runs API Maker and its databases in Docker.
<pre><code class="language-bash">curl -fsSL https://apimaker.dev/v1/install.sh > install.sh && bash install.sh --default --version=latest --license_key=YOUR_KEY</code></pre></li>
<li><strong>Connect a database</strong> Put the connection string in the default <a href="/v1/docs/secrets/secrets.html">secret</a> and add an <a href="/v1/docs/apis-all/overview.html#instances">instance</a>. Every table of it gets its <a href="/v1/docs/apis-all/overview.html">APIs</a> right away. A new account even comes with a sample shop : instance, schemas, custom APIs and hooks to read.</li>
<li><strong>Call an API</strong> Get a token of the <a href="/v1/docs/apis-security/api-user-permission.html">API user</a> with the <a href="/v1/docs/apis-all/system-apis/system-generated-token-api.html">token API</a>, send it in <code>x-am-authorization</code>, and read your data : <a href="/v1/docs/getting-started/first-api.html">Your first API</a> walks through it with curl.</li>
<li><strong>Add your logic</strong> Write <a href="/v1/docs/apis-all/custom-apis/user-created-custom-api.html">custom APIs</a>, <a href="/v1/docs/apis-all/hooks/preHook-api.html">hooks</a>, <a href="/v1/docs/apis-all/schedulers/user-created-schedulers-api.html">schedulers</a> and <a href="/v1/docs/apis-all/events/user-created-events-api.html">events</a> in TypeScript, with the <a href="/v1/docs/pre-defined-terms/global-object-g.html">global object <code>g</code></a> to reach every API of API Maker from your code.</li>
<li><strong>Secure and ship</strong> <a href="/v1/docs/apis-security/api-group-permission.html">Groups</a> decide which APIs, tables and fields each application may use, the <a href="/v1/docs/apis-security/api-security-report.html">security report</a> finds the gaps, and a <a href="/v1/docs/Git/git.html">Git pull</a> is the deployment.</li>
</ol>

## Find your way

    <a class="am-card" href="/v1/docs/getting-started/how-it-works.html">
        ⟲
        How API Maker works
        The life of a request, the API families, the two tokens and where your code runs.
    </a>
    <a class="am-card am-card--green" href="/v1/docs/apis-all/overview.html">
        ⚡
        All APIs at a glance
        Every generated, schema, custom and system API with its method and URL, on one page.
    </a>
    <a class="am-card am-card--green" href="/v1/docs/schema/schema.html">
        { }
        Table schema
        Types, validations, conversions, defaults, ids, encryption, relations, concurrency control.
    </a>
    <a class="am-card am-card--purple" href="/v1/docs/pre-defined-terms/global-object-g.html">
        g.
        The global object g
        Request, response, database, system and cache APIs, logger and shared space in your code.
    </a>
    <a class="am-card am-card--purple" href="/v1/examples/index.html">
        &lt;/&gt;
        Code examples
        A working snippet for every method of g.sys.db, g.sys.system and g.sys.cache.
    </a>
    <a class="am-card am-card--amber" href="/v1/docs/apis-all/header/requestHeader.html">
        H
        Request headers
        Tokens, response case and format, encryption, caching, sandbox, tenant, language.
    </a>
    <a class="am-card am-card--red" href="/v1/docs/apis-security/api-security-report.html">
        ⛨
        Security
        Groups, API users, auth providers, single sign-on, encrypted payloads and the security report.
    </a>
    <a class="am-card" href="/v1/docs/features/automatic-caching.html">
        ⚙
        Operations
        Caching, logs, dashboards, deployment of API Maker itself and its configuration.
    </a>
    <a class="am-card am-card--amber" href="/v1/docs/cheat-sheet.html">
        ☰
        Cheat sheet
        URLs, headers, query params and the g object on one page, to keep next to your editor.
    </a>
    <a class="am-card am-card--purple" href="/v1/docs/ai/llms.html">
        ✦
        Docs for AI assistants
        llms.txt, the Markdown twin of every page, and how to point an agent at this documentation.
        new
    </a>
    <a class="am-card" href="/v1/docs/blog/release-notes/release_notes_summary.html">
        ↑
        Release notes
        What changed in every version, from v1.0.0 to v3.3.0.
    </a>
    <a class="am-card am-card--green" href="/v1/docs/performance/api-maker/Linode/summary.html">
        ↗
        Benchmarks
        Requests per second on Linode servers from 1 to 8 vCPU, with and without caching.
    </a>

## What you get with every table

| | Schema APIs `/api/schema` | Generated APIs `/api/gen` |
|---|---|---|
| Read | get all, get all by stream, get by id, query, query by stream, count, distinct, distinct with query, aggregate (MongoDB) | the same |
| Write | save single or multiple, master save, update by id, update many, replace by id (MongoDB), array operations (MongoDB), remove by id, remove by query | the same |
| Applies the [schema](/v1/docs/schema/schema.html) | types, validations, conversions, defaults, ids, encryption, concurrency control | no : data passes as it is |
| Filters | [find](/v1/docs/apis-all/query-params/find.html) with `$in`, `$gt`, `$like`, `$regex`, `$and`, `$or`… and [find and join](/v1/docs/apis-all/query-params/find.html#find-and-join-fields-of-related-tables) across tables | the same |
| Related data | [deep populate](/v1/docs/apis-all/query-params/deep.html) across tables, databases and instances | the same |
| Output | JSON, XML, YAML, text, any key case, flat objects, encrypted : [headers](/v1/docs/apis-all/header/requestHeader.html) | the same |

Every one of them can run [pre and post hooks](/v1/docs/apis-all/hooks/preHook-api.html), be [cached](/v1/docs/features/automatic-caching.html), be [logged](/v1/docs/logs/log-profile.html), send [WebSocket notifications](/v1/docs/pages/web-socket-event-page.html) and [emit events](/v1/docs/apis-all/events/user-created-events-api.html).

## Supported databases

MongoDB · MySQL · MariaDB · PostgreSQL · Microsoft SQL Server · Oracle Database · TiDB · Percona XtraDB, in one account at the same time, with queries and [deep populate](/v1/docs/apis-all/query-params/deep.html) across them. The [connection string](/v1/docs/Database-connection-string/mongodb-connection-strings.html) pages show the format for each one.

## Watch

    <a href="https://youtu.be/7CMinfkIDCE" target="_blank" rel="noopener" style="text-align: center; text-decoration: none;">
        <img src="/assets/images/videos_thumbnails/walkthrough.png" alt="API Maker features quick walkthrough" width="300" style="border-radius: 10px">
        API Maker features quick walkthrough
    </a>

More on the [Learn API Maker](https://www.youtube.com/playlist?list=PLfJ8NnUMaDUYNNZUX5M_KcIzn9qGCNj43) playlist.

## Stay in touch

[Twitter](https://twitter.com/api_maker) · [LinkedIn](https://www.linkedin.com/company/api-maker) · [YouTube](https://www.youtube.com/@api_maker) · report a problem at [API Maker Planning](https://github.com/APIMaker-dev/API-Maker-Planning/issues) · write to [contact@apimaker.dev](mailto:contact@apimaker.dev).
