cleanup
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
---
|
||||
type: step
|
||||
category: api
|
||||
name: Advoware Proxy POST
|
||||
version: 1.0.0
|
||||
status: active
|
||||
tags: [advoware, proxy, api, rest, create]
|
||||
dependencies:
|
||||
- services/advoware.py
|
||||
emits: []
|
||||
---
|
||||
|
||||
# Advoware Proxy POST Step
|
||||
|
||||
## Zweck
|
||||
Universeller REST-API-Proxy für POST-Requests an die Advoware API zum Erstellen neuer Ressourcen.
|
||||
|
||||
## Unterschied zu GET
|
||||
- **Method**: POST statt GET
|
||||
- **Body**: JSON-Payload aus Request-Body wird an Advoware weitergeleitet
|
||||
- **Verwendung**: Erstellen von Ressourcen (Termine, Employees, etc.)
|
||||
|
||||
## Input
|
||||
```bash
|
||||
POST /advoware/proxy?endpoint=appointments
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"datum": "2026-02-10",
|
||||
"uhrzeitVon": "09:00:00",
|
||||
"text": "Meeting"
|
||||
}
|
||||
```
|
||||
|
||||
## Output
|
||||
```json
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"result": {
|
||||
"id": "12345",
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Key Differences from GET Step
|
||||
1. Request Body (`req.get('body')`) wird als `json_data` an API übergeben
|
||||
2. Kann Daten in Advoware erstellen (Side-Effects!)
|
||||
3. Response enthält oft die neu erstellte Ressource
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
curl -X POST "http://localhost:3000/advoware/proxy?endpoint=appointments" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"datum": "2026-02-10",
|
||||
"uhrzeitVon": "09:00:00",
|
||||
"uhrzeitBis": "10:00:00",
|
||||
"text": "Test Meeting"
|
||||
}'
|
||||
```
|
||||
|
||||
## KI Guidance
|
||||
Identisch zu GET-Step, außer:
|
||||
- Body-Validierung hinzufügen bei Bedarf
|
||||
- Side-Effects beachten (erstellt Daten!)
|
||||
|
||||
Siehe [advoware_api_proxy_get_step.md](advoware_api_proxy_get_step.md) für Details.
|
||||
Reference in New Issue
Block a user