FIND SAP API
Reliable SAP Business Accelerator Hub API spec downloader for OpenClaw. Uses SAP_HUB_USERNAME and SAP_HUB_PASSWORD to log in through Playwright Chromium, dow...
Latest: v1.0.2
- Dropped support and documentation for optional edge-profile authentication; now uses only environment variable credentials.
- Updated skill metadata to clarify supported operating systems and required environment variables.
- Simplified description and authentication instructions for clarity.
- Default browser set to Chromium, with edge-profile options removed from documentation and metadata.
- Improved metadata structure in SKILL.md to reflect updated requirements.
Full description
Reliable SAP Business Accelerator Hub API spec downloader for OpenClaw. Uses SAP_HUB_USERNAME and SAP_HUB_PASSWORD to log in through Playwright Chromium, downloads OpenAPI JSON/YAML and OData EDMX to /usr/download, validates payload signatures, and supports importing specs into APIConnectionToSAP categories.
SAP BAH OpenAPI Backend (OpenClaw Upload Package)
Purpose
Use this skill to reliably download SAP API specification files from hub.sap.com.
Authentication:
SAP_HUB_USERNAMESAP_HUB_PASSWORD
Downloaded files are written to:
/usr/download/<API_ID>_openapi.json/usr/download/<API_ID>_openapi.yaml/usr/download/<API_ID>_odata.edmx
Prerequisites
- Chromium available through Playwright.
- Python 3.10+.
- Python Playwright installed:
python3 -m pip install playwright
python3 -m playwright install chromium
- Writable output directory
/usr/download.
If needed:
sudo mkdir -p /usr/download
sudo chown "$USER":staff /usr/download
- Maintain login credentials via environment variables:
export SAP_HUB_USERNAME='your_user'
export SAP_HUB_PASSWORD='your_password'
Security note:
- Do not upload real credentials to ClawHub.
- Maintain credentials only in the runtime environment.
How to start
Run from repository root:
python3 Skills/sap-bah-openapi-backend-openclaw-upload-1.0.0/scripts/reliable_sap_hub_download.py \
--api-id WAREHOUSEORDER_0001
How to use
1) Download one or more API IDs
python3 Skills/sap-bah-openapi-backend-openclaw-upload-1.0.0/scripts/reliable_sap_hub_download.py \
--api-id WAREHOUSEORDER_0001 \
--api-id API_APAR_SEPA_MANDATE_SRV
2) Download from file list
python3 Skills/sap-bah-openapi-backend-openclaw-upload-1.0.0/scripts/reliable_sap_hub_download.py \
--api-id-file /path/to/api_ids.txt
api_ids.txt example:
WAREHOUSEORDER_0001
API_APAR_SEPA_MANDATE_SRV
sap-s4-CE_EBPPPAYMENTREQUEST_0001-v1
3) Useful runtime options
python3 Skills/sap-bah-openapi-backend-openclaw-upload-1.0.0/scripts/reliable_sap_hub_download.py \
--api-id WAREHOUSEORDER_0001 \
--retries 4 \
--timeout-seconds 90 \
--json-report /usr/download/sap_download_report.json
4) Import downloaded files into project category
python3 Skills/sap-bah-openapi-backend-openclaw-upload-1.0.0/scripts/import_sap_hub_spec.py \
--category AccountsReceivable \
--pattern CONTRACTACCOUNT_0001 \
--mode copy
Reliability behavior
The downloader script automatically:
- In default
envmode, starts with a clean temporary browser profile. - Uses Playwright Chromium.
- Logs in using
SAP_HUB_USERNAMEandSAP_HUB_PASSWORD. - Downloads JSON/YAML/EDMX through Hub authenticated
$valueendpoints. - Retries transient failures.
- Rejects OAuth/login HTML payloads.
- Verifies expected OpenAPI/EDMX signatures before writing files.
Output contract
- Exit code
0: all requested files downloaded and validated. - Exit code
2: partial/complete failures (see JSON report/stdout report).
Included files
scripts/reliable_sap_hub_download.pyscripts/import_sap_hub_spec.pyscripts/scaffold_backend_from_openapi.pyreferences/quickstart.md
