---
title: Import a Total.js app
project: TotalAPI
version: Latest
section: guides
language: en
license: 
url: https://totaljs.es/docs/totalapi/latest/guides/total-js-apps/
updated: 2026-12-02T15:40:11.062Z
---

# Import a Total.js app

> A Total.js 5 app writes a file with all its routes and actions, `index.js.map`. TotalAPI makes a request of each one, with a form for its data.

## Import the app

1. Run the app once. It writes `index.js.map` next to its `index.js`.
2. Press **Import from a Total.js index.js.map** at the start, or the button with the arrow down at the top when a collection is open.
3. Choose the `index.js.map` of the app.
4. Write the **Name of the collection**, and in **Where to try its APIs** the address where the app runs, such as `http://localhost:8000`. It becomes the variable `base` of the first environment.
5. Press **Import and save…** and choose where to save the collection.

## What you find

- The API actions are in folders by the first word of their name: `users_list` and `users_save` are together. The folder has the name of the plugin when the app has one for that word.
- The other routes are in the folder **Pages**. A part of their address such as `{id}` becomes the variable `{{id}}`: [add it to the environment](/totalapi/latest/guides/variables/) before you send one.
- Sockets are left out.
- A dot at the end of an action says that it needs a signed-in user. [Sign in](/totalapi/latest/guides/sign-in/) explains how to send it as one.

## Fill in the form of an action

![The form of an action, with a required name and email and lists for the rest](https://totaljs.es/_totaldesktop/shots/totalapi-2.webp)

The tab **Action** has up to three groups: **Parameters**, **Query** and **Data**. Each field says its type, and the required ones have an asterisk.

- A field with fixed values, and a yes or no, is a list. The dash is no value.
- A list is written with commas, `red, green`, or as JSON, `["red","green"]`. A list of numbers is written the same way, `1, 2, 3`.
- An object is written as JSON.
- Variables work in every field: `{{email}}`, `{{$uid}}`.

Fields of **Query** and **Data** left empty are not sent. All the fields are checked before sending: the required ones, the emails, the numbers and the fixed values.

TotalAPI writes the call as Total.js reads it, so an action has no method to choose and no **Body** tab. To use the call in the interface of your app, [copy it as TAPI](/totalapi/latest/guides/copy-as-code/).

## When the routes change

Run the app again, so that it writes its map again, and import it. Each import makes a new collection: the values, checks and notes that you wrote stay in the one before.
