|
2 | 2 |
|
3 | 3 | Use this guide after installing Postman and cloning the repository. |
4 | 4 |
|
5 | | -## Import Files Into Postman |
| 5 | +Required Postman version: **Postman Desktop v12+**. |
6 | 6 |
|
7 | | -In Postman, import the following files: |
| 7 | +## Local-Mode Source of Truth |
8 | 8 |
|
9 | | -- [`postman/collections/PyPNM.postman_collection.json`](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/collections/PyPNM.postman_collection.json) |
10 | | -- [`postman/collections/PyPNM-CMTS.postman_collection.json`](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/collections/PyPNM-CMTS.postman_collection.json) |
11 | | -- [`postman/environments/PyPNM Remote Server.postman_environment.json`](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/environments/PyPNM%20Remote%20Server.postman_environment.json) |
12 | | -- [`postman/globals/workspace.postman_globals.json`](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/globals/workspace.postman_globals.json) |
| 9 | +This repository uses Postman local-mode file artifacts: |
13 | 10 |
|
14 | | -Recommended import flow: |
| 11 | +- Collections: `postman/collections/<collection>/.../*.request.yaml` |
| 12 | +- Environments: `postman/environments/*.environment.yaml` |
| 13 | +- Globals: `postman/globals/*.globals.yaml` |
| 14 | + |
| 15 | +Do not expect a single `*.postman_collection.json` export as the primary source. |
| 16 | + |
| 17 | +## Open In Postman |
| 18 | + |
| 19 | +Recommended flow: |
15 | 20 |
|
16 | 21 | 1. Open Postman Desktop |
17 | | -2. Click `Import` |
18 | | -3. Select `Files` |
19 | | -4. Choose the files listed above |
20 | | -5. Confirm import |
| 22 | +2. Use local mode / open workspace from your cloned repository |
| 23 | +3. Point Postman to this repository root so it can read `postman/` YAML artifacts |
21 | 24 |
|
22 | | -## Configure Base URL / Globals |
| 25 | +## Configure Base URL / Variables |
23 | 26 |
|
24 | | -Set `pypnm_url` in Postman Globals. |
| 27 | +Set `pypnm_url` in globals (or equivalent environment variable if your workspace uses environment scope). |
25 | 28 |
|
26 | 29 | Example: |
27 | 30 |
|
28 | 31 | - `http://127.0.0.1:8000` |
29 | 32 |
|
30 | 33 | Important: |
31 | 34 |
|
32 | | -- Collection requests use `{{pypnm_url}}` (global variable) |
33 | | -- The provided environment file includes `base_url` |
34 | | -- If you prefer environment-only configuration, update the collection requests to use `{{base_url}}` |
| 35 | +- Request URLs in this repo use `{{pypnm_url}}` by default. |
| 36 | +- Keep variable syntax in Postman form (`{{var}}`). |
35 | 37 |
|
36 | | -## Navigate the Imported Content |
| 38 | +## Navigate Main Collections |
37 | 39 |
|
38 | | -### Collections |
| 40 | +- `postman/collections/PyPNM/` |
| 41 | +- `postman/collections/PyPNM-CMTS/` |
39 | 42 |
|
40 | | -- `PyPNM` (primary collection) |
41 | | -- `PyPNM-CMTS` (placeholder shell) |
42 | | - |
43 | | -### Good First Request |
| 43 | +## Good First Request |
44 | 44 |
|
45 | 45 | Use a simple health check first: |
46 | 46 |
|
47 | | -1. Open [`PyPNM` collection](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/collections/PyPNM.postman_collection.json) |
48 | | -2. Open `Health` folder |
49 | | -3. Open `Health` request |
| 47 | +1. Open collection `PyPNM` |
| 48 | +2. Open folder `Health` |
| 49 | +3. Open request `Health.request.yaml` (`name: Health`) |
50 | 50 | 4. Confirm `pypnm_url` is set |
51 | 51 | 5. Click `Send` |
52 | 52 |
|
53 | | -### Common Next Areas |
| 53 | +## Common Next Areas |
54 | 54 |
|
55 | 55 | - `SingleCapture` for single-capture workflows and visualizers |
56 | 56 | - `MultiCapture` for multi-capture operations and analysis flows |
57 | | -- `FileManager` for file workflow endpoints |
| 57 | +- `PNM/Files` for file workflow endpoints |
58 | 58 | - `System` / `Health` for service checks and system actions |
59 | 59 |
|
60 | | -## Troubleshooting Import Setup |
| 60 | +## Troubleshooting |
| 61 | + |
| 62 | +- If variables appear unresolved, confirm globals/environment YAML loaded in local mode. |
| 63 | +- If requests fail immediately, verify `pypnm_url` and authentication-related variables. |
| 64 | +- If visual output looks stale, run: |
61 | 65 |
|
62 | | -- If requests fail immediately, confirm `pypnm_url` is set in [Globals (`workspace.postman_globals.json`)](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/globals/workspace.postman_globals.json) |
63 | | -- If variables appear unresolved, verify [`workspace.postman_globals.json`](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/globals/workspace.postman_globals.json) imported successfully |
64 | | -- If you use the environment value (`base_url`) instead, verify the imported environment [`PyPNM Remote Server.postman_environment.json`](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/environments/PyPNM%20Remote%20Server.postman_environment.json) and ensure request URLs in [`PyPNM.postman_collection.json`](https://github.com/PyPNMApps/Postman-PyPNMApps-API/blob/main/postman/collections/PyPNM.postman_collection.json) were updated from `{{pypnm_url}}` |
| 66 | +```bash |
| 67 | +source .venv/bin/activate |
| 68 | +tools/postman/sync_visualizers.py --check |
| 69 | +``` |
0 commit comments