Skip to content

Commit 0387ae8

Browse files
committed
docs: add dashbot docs
1 parent a9546be commit 0387ae8

23 files changed

+271
-0
lines changed
Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
# Dashbot User Guide
2+
3+
Dashbot is your in-app helper for working with APIs inside API Dash. It explains responses, helps fix failing requests, imports cURL/OpenAPI, generates documentation, tests, and runnable code — all without leaving your current request.
4+
5+
6+
## Before You Start
7+
- **Configure an AI model** : Open the AI Request settings and set your preferred provider/model and API key. Dashbot needs this to generate answers. If not configured, you will see a message asking you to set it up.
8+
- **Pick or create a request** : Dashbot works best when a request is selected, especially for Explain, Debug, Tests, Docs, and Code.
9+
- **Network access** : Some features pull insights only from your current request and input. No external API calls are made by Dashbot itself (outside your configured AI provider).
10+
11+
## Open Dashbot
12+
- Floating window: Click the Dashbot button to open it as a floating panel.
13+
- Move: Drag the colored top bar to reposition.
14+
- Resize: Drag the small handle at the top-left corner.
15+
- Pop in/out: Use the “open in new” icon to toggle between the floating window and the in-tab view.
16+
- Close: Click the Close icon. You can reopen anytime.
17+
- In a tab: Use the Dashbot tab for a docked experience with back and close controls.
18+
19+
![Image](./images/dashbot/dashbot_fab.png)
20+
![Image](./images/dashbot/dashbot_pop_up.png)
21+
![Image](./images/dashbot/dashbot_tab_view.png)
22+
23+
## Home Screen Tasks
24+
Dashbot’s home screen lists quick actions:
25+
- Explain response: Explains the last response for the selected request.
26+
- Debug error: Analyzes a failing response and proposes minimal fixes.
27+
- Generate documentation: Creates clean Markdown docs for your request/response and lets you download them.
28+
- Generate tests: Builds simple JavaScript tests; you can add them to the request’s post-request script.
29+
- Generate code: Produces runnable code in common languages.
30+
- Import cURL: Paste a full cURL to recreate a request.
31+
- Import OpenAPI: Upload, paste, or fetch (URL) a spec and import endpoints.
32+
33+
![Image](./images/dashbot/dashbot_tasks.png)
34+
35+
---
36+
37+
## Import cURL
38+
Turn a cURL command into an API Dash request without manual setup.
39+
40+
How it works
41+
1) Choose “Import cURL”.
42+
2) Paste a complete command starting with `curl ...`.
43+
3) Dashbot parses the command and shows:
44+
- A short summary (method, URL, headers, body type)
45+
- A diff preview vs your currently selected request (if any)
46+
- Action buttons:
47+
- Apply to Selected: Update the currently selected request.
48+
- Create New Request: Add a new request to your collection.
49+
4) Click an action to apply.
50+
51+
Base URL as environment
52+
- Dashbot detects the base URL and may rewrite your request URL as `{{BASE_URL_<HOST>}}/path`.
53+
- It will create or update a variable in your active Environment (for example `BASE_URL_API_EXAMPLE_COM`).
54+
- See Environment guide for details on editing values.
55+
56+
What’s included from cURL
57+
- Method, full URL
58+
- Headers (including Cookie, User-Agent, Referer; Basic auth from `-u user:pass`)
59+
- Body or form data when present
60+
61+
Known limits
62+
- Some flags do not map to requests (e.g., `-k` insecure SSL, `-L` follow redirects, or very advanced curl options). Review and adjust after import if needed.
63+
- If parsing fails, ensure the command is complete and starts with `curl`.
64+
65+
![Image](./images/dashbot/dashbot_curl_paste.png)
66+
![Image](./images/dashbot/dashbot_curl_result.png)
67+
68+
69+
---
70+
71+
## Import OpenAPI
72+
Import endpoints from an OpenAPI (Swagger) spec to quickly scaffold requests.
73+
74+
Supported input
75+
- JSON or YAML OpenAPI files.
76+
- Public URL to a JSON or YAML OpenAPI document (e.g., `https://api.apidash.dev/openapi.json`).
77+
- Upload via the “Upload Attachment” button (file picker), paste the full spec into the chat box, or enter a URL in the chat field and fetch.
78+
79+
Workflow
80+
1) Choose “Import OpenAPI”.
81+
2) Provide the spec by uploading, pasting, or entering a URL then clicking Fetch.
82+
3) If valid, Dashbot shows a summary plus an “Import Now” button.
83+
4) Click “Import Now” to open the Operation Picker.
84+
5) In the picker:
85+
- Select All or cherry-pick operations (multi-select).
86+
- Click Import to add them as new requests.
87+
6) New requests are named like `GET /users`, `POST /items`, etc.
88+
89+
Base URL as environment
90+
- If the spec defines servers, Dashbot will infer the base URL and may rewrite imported URLs to use an environment variable like `{{BASE_URL_<HOST>}}`.
91+
92+
URL fetching notes
93+
- The URL must be publicly reachable and return raw JSON or YAML (not an HTML page).
94+
- Auth-protected or dynamically generated docs pages may fail; download and upload the spec instead.
95+
- Large remote specs may take longer; try file upload if a timeout occurs.
96+
97+
Notes and limits
98+
- Very large specs may take longer and could show only the first N routes for performance.
99+
- Some request body examples or schema-derived form fields may not auto-populate if missing explicit examples.
100+
- “Apply to Selected” is supported when importing a single operation via certain actions, but the Operation Picker’s “Import” creates new requests.
101+
- If URL import fails, verify the URL returns the spec directly and that no authentication is required.
102+
103+
![Image](./images/dashbot/dashbot_openapi_task.png)
104+
![Image](./images/dashbot/dashbot_openapi_file_picker.png)
105+
![Image](./images/dashbot/dashbot_openapi_response.png)
106+
![Image](./images/dashbot/dashbot_openapi_route_selection.png)
107+
108+
---
109+
110+
## Explain Response
111+
Get a clear, friendly explanation for the selected request.
112+
113+
Use when
114+
- You received a status like 2xx/4xx/5xx and want a quick understanding.
115+
116+
What you get
117+
- Short summary of what happened
118+
- Explanation of the status code in simple terms
119+
- Key details from the response body
120+
- Likely causes or conditions
121+
- Practical next steps
122+
123+
Tips
124+
- The explanation is textual. There are no “Auto Fix” actions in this mode.
125+
- Use the copy icon to copy the response for documentation or sharing.
126+
127+
![Image](./images/dashbot/dashbot_explanation.png)
128+
129+
---
130+
131+
## Debug Error (Auto Fix)
132+
Diagnose a failing request and apply suggested fixes with one click.
133+
134+
Use when
135+
- Your request returns 4xx/5xx or unexpected results.
136+
137+
What you get
138+
- Human-friendly analysis of the problem
139+
- A plan of suggested changes (method/URL/headers/params/body)
140+
- Action buttons (Auto Fix) that apply the change directly
141+
142+
Applying fixes
143+
- Click “Auto Fix” on a suggested change:
144+
- Update field: URL, method, parameters
145+
- Headers: add/update/delete
146+
- Body: replace or set content type
147+
- Apply cURL/OpenAPI: import payloads to selected or new request
148+
- Changes apply to the currently selected request.
149+
150+
Undo and safety
151+
- Review changes before running again. If you need to revert, use your request history or edit fields manually.
152+
- Dashbot aims for minimal, targeted changes. You control what to apply.
153+
154+
![Image](./images/dashbot/dashbot_debug_error.png)
155+
![Image](./images/dashbot/dashbot_debug_result.png)
156+
157+
---
158+
159+
## Generate Documentation
160+
Produce clean Markdown docs for your request/response.
161+
162+
How to use
163+
1) Choose “Generate documentation”.
164+
2) Dashbot returns Markdown with:
165+
- Title and description
166+
- Request details (method, URL, headers, parameters)
167+
- Response details and codes
168+
- Example responses
169+
- Key takeaways
170+
3) Use an action:
171+
- Copy: Copies the Markdown to your clipboard.
172+
- Download Now: Saves a `.md` file to your system Downloads folder (auto-generated filename like `api-documentation.md`).
173+
174+
Notes
175+
- Downloaded file is plain Markdown; move or rename it as needed.
176+
- If a file name collision occurs, a numeric suffix may be appended.
177+
178+
![Image](./images/dashbot/dashbot_documentation.png)
179+
180+
---
181+
182+
## Generate Tests
183+
Create lightweight JavaScript tests for your request.
184+
185+
How it works
186+
1) Choose “Generate Tests”.
187+
2) Dashbot replies with a test plan and a code action.
188+
3) Click “Add Test” to insert the code into the request’s post-request script.
189+
4) Send the request to execute the script after the response.
190+
191+
Where tests go
192+
- Tests are added to the current request’s post-request script area.
193+
- You can modify or remove the script anytime.
194+
195+
Notes and limits
196+
- Tests are self-contained (no external packages). They run with plain JavaScript features.
197+
- Add real credentials or tokens if needed; placeholders are used when values are unknown.
198+
199+
![Image](./images/dashbot/dashbot_tests.png)
200+
![Image](./images/dashbot/dashbot_tests_res.png)
201+
202+
---
203+
204+
## Generate Code
205+
Get runnable code samples for the current request in popular languages.
206+
207+
Workflow
208+
1) Choose “Generate Code”.
209+
2) Select a language from the buttons (JavaScript, Python, Dart, Go, cURL).
210+
3) Dashbot returns a code block. Copy it and run in your environment.
211+
212+
What you get
213+
- Minimal script that sends your request
214+
- Respect for method/URL/headers/params/body
215+
- Basic error handling and printing of status/body
216+
- Notes about any required libraries (with install commands) when applicable
217+
218+
Tips
219+
- Replace placeholders (API keys/tokens) with real values.
220+
- Verify content types and body structures match your API.
221+
222+
![Image](./images/dashbot/dashbot_codegen.png)
223+
![Image](./images/dashbot/dashbot_codegen_res_1.png)
224+
![Image](./images/dashbot/dashbot_codegen_res_2.png)
225+
226+
---
227+
228+
## Action Buttons Explained
229+
- Apply to Selected: Applies changes to the currently selected request.
230+
- Create New Request: Adds a new request with the suggested setup.
231+
- Import Now (OpenAPI): Opens an operation picker to import endpoints.
232+
- Auto Fix: Applies a specific change (header/url/method/body/params) to the selected request.
233+
- Select Operation: Appears for certain OpenAPI actions to apply a single operation.
234+
- Language buttons: Ask Dashbot to generate code in a specific language.
235+
- Add Test: Appends test code to your post-request script.
236+
237+
---
238+
239+
## Environment Integration
240+
- Base URL variables: Dashbot can auto-create `{{BASE_URL_<HOST>}}` variables in your active environment when importing cURL/OpenAPI.
241+
- Editing values: Open the Environment manager to update base URLs per environment. See the [Environment Variables](./env_user_guide.md) guide.
242+
243+
![Image](./images/dashbot/dashbot_env_vars.png)
244+
245+
---
246+
247+
## Capabilities and Limitations
248+
- Focus: Dashbot is focused on API tasks. It will refuse unrelated questions.
249+
- Minimal changes: Auto Fix aims for small, safe edits you approve explicitly.
250+
- Placeholders: When values are unknown, placeholders like `YOUR_API_KEY` are used — replace them.
251+
- cURL flags: Not all flags map 1:1 (e.g., `-k`, `-L`). Review results.
252+
- OpenAPI edge cases: Some specs may omit examples or complex schemas; imports may need manual tweaks.
253+
- Code/tests: Generated snippets are examples. Validate and adapt before production use.
254+
255+
---
256+
257+
## Troubleshooting
258+
- AI model is not configured: Set it in the AI Request settings; then retry.
259+
- cURL parsing failed: Ensure the command starts with `curl` and is complete. Remove shell-specific parts and try again.
260+
- OpenAPI parsing failed (file/paste): Make sure the spec is valid JSON/YAML and complete. Try a smaller spec if huge.
261+
- OpenAPI URL fetch failed: Check that the URL returns raw JSON/YAML (not HTML), is publicly accessible, and does not require authentication; otherwise download and upload the file.
262+
- No actions shown: Some tasks return explanations only. That’s expected for Explain/Docs.
263+
- Changes didn’t apply: Ensure a request is selected and re-run the action. Use “Apply to Selected” vs “Create New Request” appropriately.
264+
- Documentation file not found: Confirm your Downloads folder is writable; retry or use Copy instead.
265+
266+
---
267+
268+
## Frequently Asked Questions
269+
- Does Dashbot send my data elsewhere? It uses the AI provider you configured to generate text. Your requests/responses may be included in prompts. Review your provider’s privacy policy and avoid sharing secrets.
270+
- Can I undo a fix? Use request history or manually revert fields. Consider “Create New Request” to keep the original unchanged.
271+
- Can I mix steps (e.g., import cURL, then debug)? Yes. Dashbot keeps the session per selected request.
543 KB
Loading
536 KB
Loading
485 KB
Loading
637 KB
Loading
357 KB
Loading
553 KB
Loading
521 KB
Loading
500 KB
Loading
678 KB
Loading

0 commit comments

Comments
 (0)