Update documentation.

This commit is contained in:
2026-03-28 17:42:37 +05:30
parent 01662f7e0e
commit 79b120ff91
25 changed files with 109 additions and 109 deletions

View File

@@ -1,6 +1,6 @@
# APIClient - Agent
> **AI-first API testing desktop client** built with Python + PyQt6.
> **AI-first API testing desktop client** - built with Python + PyQt6.
> Specialised for the [EKIKA Odoo API Framework](https://apps.odoo.com/apps/modules/19.0/api_framework), but works with any REST, GraphQL, or WebSocket API.
---
@@ -8,31 +8,31 @@
## Features
### Core API Testing
- **Multi-tab request editor** work on multiple requests simultaneously, drag to reorder
- **All HTTP methods** GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
- **Smart params & headers table** per-row enable/disable checkboxes, 36 px comfortable rows, auto-expanding blank row
- **Body editor** raw JSON/XML/text with syntax highlighting, **Format JSON** button, `application/vnd.api+json` support
- **Auth panel** Bearer Token, Basic Auth, API Key (header or query)
- **Pre-request scripts** Python executed before each request; access `pm.environment.get/set`
- **Test scripts** assertions auto-run after every response; `pm.test(...)` / `expect(...)` DSL
- **Response viewer** syntax-highlighted body, headers table, test results, search, copy, save
- **WebSocket client** connect, send, receive, log messages
- **Mock server** local HTTP mock with configurable routes
- **Multi-tab request editor** - work on multiple requests simultaneously, drag to reorder
- **All HTTP methods** - GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
- **Smart params & headers table** - per-row enable/disable checkboxes, 36 px comfortable rows, auto-expanding blank row
- **Body editor** - raw JSON/XML/text with syntax highlighting, **Format JSON** button, `application/vnd.api+json` support
- **Auth panel** - Bearer Token, Basic Auth, API Key (header or query)
- **Pre-request scripts** - Python executed before each request; access `pm.environment.get/set`
- **Test scripts** - assertions auto-run after every response; `pm.test(...)` / `expect(...)` DSL
- **Response viewer** - syntax-highlighted body, headers table, test results, search, copy, save
- **WebSocket client** - connect, send, receive, log messages
- **Mock server** - local HTTP mock with configurable routes
### Collections & Environments
- **Collections sidebar** import/export Postman Collection v2.1 JSON, cURL
- **Environment variables** `{{base_url}}`, `{{api_key}}`, etc. resolved at send time; per-environment values
- **Collection runner** run all requests in a collection, view pass/fail results
- **History** every sent request automatically saved
- **Collections sidebar** - import/export Postman Collection v2.1 JSON, cURL
- **Environment variables** - `{{base_url}}`, `{{api_key}}`, etc. resolved at send time; per-environment values
- **Collection runner** - run all requests in a collection, view pass/fail results
- **History** - every sent request automatically saved
### AI Co-pilot (Claude-powered)
- **Persistent AI chat sidebar** toggle with the `✦ AI` button or `Ctrl+Shift+A`
- **Full context awareness** AI sees your current request (method, URL, headers, body, params, test scripts) and the last response (status, body, errors); secrets are automatically redacted
- **Streaming responses** tokens stream in real time
- **One-click Apply** AI suggestions come with **Apply Body**, **Apply Params**, **Apply Headers**, **Apply Test Script** buttons that set the values directly in the request editor
- **Multi-turn conversation** full history maintained per session; Clear to reset
- **Quick actions** Analyze, Fix Error, Gen Body, Write Tests, Auth Help, Explain Response
- **EKIKA Odoo collection generator** generate complete collections for JSON-API, REST JSON, GraphQL, and Custom REST JSON without spending AI tokens; supports all auth types
- **Persistent AI chat sidebar** - toggle with the `✦ AI` button or `Ctrl+Shift+A`
- **Full context awareness** - AI sees your current request (method, URL, headers, body, params, test scripts) and the last response (status, body, errors); secrets are automatically redacted
- **Streaming responses** - tokens stream in real time
- **One-click Apply** - AI suggestions come with **Apply Body**, **Apply Params**, **Apply Headers**, **Apply Test Script** buttons that set the values directly in the request editor
- **Multi-turn conversation** - full history maintained per session; Clear to reset
- **Quick actions** - Analyze, Fix Error, Gen Body, Write Tests, Auth Help, Explain Response
- **EKIKA Odoo collection generator** - generate complete collections for JSON-API, REST JSON, GraphQL, and Custom REST JSON without spending AI tokens; supports all auth types
### EKIKA Odoo API Framework specialisation
- Generates full CRUD + Execute / Export / Report / Fields / Access-Rights endpoints per model
@@ -73,14 +73,14 @@ pyinstaller>=6.0.0
## Quick Start
### 1 Send your first request
### 1 - Send your first request
1. Launch the app: `python main.py`
2. Type a URL in the bar, e.g. `https://jsonplaceholder.typicode.com/todos/1`
3. Press **Send** (or `Ctrl+Enter`)
4. See the JSON response with syntax highlighting in the bottom panel
### 2 Use environment variables
### 2 - Use environment variables
1. Click **Manage****New Environment** → name it `My API`
2. Add variables:
@@ -93,7 +93,7 @@ pyinstaller>=6.0.0
5. In Headers, add `Authorization: Bearer {{api_key}}`
6. Variables are resolved automatically at send time
### 3 Import a collection
### 3 - Import a collection
**From Postman export:**
1. `File → Import…`
@@ -109,11 +109,11 @@ curl -X POST https://api.example.com/v1/orders \
**From OpenAPI spec:**
1. `Tools → AI Assistant → Import from Docs`
2. Paste the OpenAPI JSON/YAML URL parsed instantly, no AI tokens used
2. Paste the OpenAPI JSON/YAML URL - parsed instantly, no AI tokens used
---
## EKIKA Odoo API Framework Complete Example
## EKIKA Odoo API Framework - Complete Example
### Generate a collection in 30 seconds
@@ -131,8 +131,8 @@ curl -X POST https://api.example.com/v1/orders \
| Models | `sale.order, res.partner, account.move` |
| Operations | ✓ List, Get, Create, Update, Delete |
4. Click **Generate Collection** preview appears instantly
5. Click **Import Both** collection + environment are saved
4. Click **Generate Collection** - preview appears instantly
5. Click **Import Both** - collection + environment are saved
This generates the following requests for each model with zero AI tokens:
@@ -200,7 +200,7 @@ Select **API Kind: GraphQL**. The generator creates:
---
## AI Chat Co-pilot Example Session
## AI Chat Co-pilot - Example Session
Click **✦ AI** in the top bar to open the sidebar. The AI automatically knows what request you have open and the last response.
@@ -227,7 +227,7 @@ AI: A 401 on the EKIKA JSON-API endpoint means the x-api-key header is
[ Apply Headers to Request ]
```
Click **Apply Headers to Request** headers are set immediately and the Headers tab opens.
Click **Apply Headers to Request** - headers are set immediately and the Headers tab opens.
### Generating a body for a complex model
@@ -305,8 +305,8 @@ APIClient-Agent/
│ ├── core/
│ │ ├── storage.py # SQLite persistence (collections, environments, history)
│ │ ├── http_client.py # httpx-based request engine, variable resolution
│ │ ├── ai_client.py # Claude API collection generation from docs
│ │ ├── ai_chat.py # Claude API multi-turn conversational co-pilot
│ │ ├── ai_client.py # Claude API - collection generation from docs
│ │ ├── ai_chat.py # Claude API - multi-turn conversational co-pilot
│ │ ├── openapi_parser.py # OpenAPI 3.x / Swagger 2.0 local parser
│ │ ├── ekika_odoo_generator.py# EKIKA Odoo framework collection generator
│ │ ├── test_runner.py # pm.test / expect assertion engine
@@ -345,7 +345,7 @@ Settings are stored in an SQLite database at `~/.apiclient_agent/data.db` (creat
2. In the app: `Tools → AI Assistant → Settings tab`
3. Paste the key and click **Save API Key**
The key is stored locally in the SQLite database only never transmitted except to the Anthropic API.
The key is stored locally in the SQLite database only - never transmitted except to the Anthropic API.
---
@@ -354,7 +354,7 @@ The key is stored locally in the SQLite database only — never transmitted exce
Some servers (especially demo/development instances) use self-signed certificates or wildcard certificates that don't match the exact hostname. If you see:
```
SSL certificate error could not connect to https://...
SSL certificate error - could not connect to https://...
Tip: disable SSL verification in the request Settings tab.
```
@@ -382,10 +382,10 @@ The executable is produced in `dist/APIClient-Agent`.
3. Commit your changes: `git commit -m "Add my feature"`
4. Push and open a pull request
Please keep UI styling in `theme.py` using `setObjectName()` selectors never inline `setStyleSheet()` for static colors.
Please keep UI styling in `theme.py` using `setObjectName()` selectors - never inline `setStyleSheet()` for static colors.
---
## License
[MIT License](LICENSE) Copyright (c) 2026 EKIKA.co
[MIT License](LICENSE) - Copyright (c) 2026 EKIKA.co