Harald Welte | 3c4d006 | 2019-03-31 18:55:18 +0200 | [diff] [blame] | 1 | == remsim-server |
| 2 | |
| 3 | === Running |
| 4 | |
| 5 | `remsim-server` currently has no command-line arguments. It will bind to |
| 6 | INADDR_ANY and offer the following TCP ports: |
| 7 | |
| 8 | * Port 9998 for the inbound control connections from `remsim-client` |
| 9 | and `remsim-bankd` |
| 10 | * Port 9997 for the RESTful/JSON Web API (role: HTTP server) |
| 11 | |
| 12 | It is intended to make these settings (IP addresses, ports) configurable |
| 13 | in future versions. |
| 14 | |
| 15 | === Logging |
| 16 | |
| 17 | `remsim-server` currently logs to stdout only, and the logging verbosity |
| 18 | is not yet configurable. However, as the libosmocore logging framework |
| 19 | is used, extending this is an easy modification. |
| 20 | |
| 21 | === RESTful/JSON Web API |
| 22 | |
| 23 | `remsim-server` provides a RESTful/JSON WEB API for application logic |
| 24 | integration. The purpose of the API is to allow run-time configuration |
| 25 | and monitoring of the entire osmo-remsim system. |
| 26 | |
| 27 | The API currently has version 1, and the URL prefix is /api/backend/v1 |
| 28 | |
| 29 | ==== /api/backend/v1/clients |
| 30 | |
| 31 | *GET* obtains a JSON list where each element represents one currently |
| 32 | connected `remsim-client`. |
| 33 | |
| 34 | No other HTTP operation is implemented. |
| 35 | |
| 36 | ==== /api/backend/v1/clients/:client_id |
| 37 | |
| 38 | *GET* obtains a single JSON object representing one specific currently |
| 39 | connected `remsim-client`. |
| 40 | |
| 41 | No other HTTP operation is implemented. |
| 42 | |
| 43 | ==== /api/backend/v1/bankds |
| 44 | |
| 45 | *GET* obtains a JSON list where each element represents one currently |
| 46 | connected `remsim-bankd`. |
| 47 | |
| 48 | No other HTTP operation is implemented. |
| 49 | |
| 50 | ==== /api/backend/v1/bankds/:bank_id |
| 51 | |
| 52 | *GET* obtains a single JSON object representing one specific currently |
| 53 | connected `remsim-bankd`. |
| 54 | |
| 55 | No other HTTP operation is implemented. |
| 56 | |
| 57 | ==== /api/backend/v1/slotmaps |
| 58 | |
| 59 | *GET* obtains a JSON list where each element represents one provisioned |
| 60 | slot mapping. |
| 61 | |
| 62 | *POST* creates a new slot mapping as specified in the JSON syntax |
| 63 | contained in the HTTP body. |
| 64 | |
| 65 | No other HTTP operation is implemented. |
| 66 | |
| 67 | ==== /api/backend/v1/slotmaps/:slotmap_id |
| 68 | |
| 69 | *DELETE* deletes a slot mapping by its identifier. If the mapping is |
| 70 | currently in use, the related bankd is instructed to disconnect the |
| 71 | client from the card. |
| 72 | |
| 73 | No other HTTP operation is implemented. |
| 74 | |
| 75 | ==== /api/backend/v1/global-reset |
| 76 | |
| 77 | *POST* performs a global reset of the `remsim-server` state. This means |
| 78 | all mappings are removed. |