---
# System prepended metadata

title: INGKA-admin-backend

---

# INGKA-admin-backend
Such a magnificent node js backend

# Installation
http://confluence.kt-team.de/display/INGKA/ingka-admin-backend

# Working scheme
![](https://i.imgur.com/GyRsTzi.jpg)

# Routes
### Administration:

| Route | Method | Description | query/body params |
| -------- | -------- | -------- | -------- |
| /es/indices/remove | GET | Removes indices by regexp | regexp |
| /versions/storefront | GET | Get current storefront version | - |
| /versions/agent | GET | Get current agent version | - |

### DemoTerminal:

| Route | Method | Description | query/body params |
| -------- | -------- | -------- | -------- |
| /create | GET | Create demo terminal | mallId, terminalId |

### Entities:

| Route | Method | Description | query/body params |
| -------- | -------- | -------- | -------- |
| /:entity/delete | DELETE | Delete entity by id | id |
|  /:entity/deleteAll | DELETE | Delete entities | id |
| /:entity/create | POST | Create entity by model | entity model |
| /:entity/update | PUT | Update entity by model | entity model |
| /:entity/fetch | GET | Search request | search request data params |
| /:entity/reindex | GET | ES reindex entity | - |

### EsProxy:

| Route | Method | Description | query/body params |
| -------- | -------- | -------- | -------- |
| /search | GET, POST | Search with params in elastic | search params, query body in POST |

### Images:

| Route | Method | Description | query/body params |
| -------- | -------- | -------- | -------- |
| /get/image/:id | GET | Get image from elastic by id | - |
| /create | POST | Create image | Image model |

### Operations:

| Route | Method | Description | query/body params |
| -------- | -------- | -------- | -------- |
| /get/:id | GET |  | - |
| /import | GET |  | - |
| /import/images | GET |  | - |
| /reindex | GET |  | - |
| /stop | PUT |  | - |
| /resume | PUT |  | - |
| /active | GET |  | - |
| /runQueuedOperations | POST |  | - |


# Services
# Repositories

# Dev mode
just run `npm run dev`

# Debug
### 1. Run server in dev inspect mode
Run `npm run di`\
![](https://i.imgur.com/FYRSMuu.png)
It will rebuild automatically on any changes

### 2. Connect to code via Chrome
Navigate to [chrome://inspect/#devices](chrome://inspect/#devices)
![](https://i.imgur.com/bvDVZm7.png)
Remote Target usually appears in 5 seconds\
Press Open dedicated DevTools for Node\
You should have this page opened
![](https://i.imgur.com/BB0QWR0.png)
If you have no files to view, open your working folder manually\
Open tab Filesystem and press Add folder to workspace
![](https://i.imgur.com/Bq4fKgR.png)
Ready to debug, just select any file you want to debug and click on suspicious line number