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
- Run the app once. It writes
index.js.mapnext to itsindex.js. - 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.
- Choose the
index.js.mapof the app. - 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 variablebaseof the first environment. - 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_listandusers_saveare 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 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 explains how to send it as one.
Fill in the form of an action

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.
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.