UI theme designer help
Context
The UI theme designer documentation is served by https://help.sap.com via a JSON HTTP API:
Deliverable metadata — resolves human-readable identifiers to internal IDs and provides the flat readable-URL-to-loio mapping:
GET https://help.sap.com/http.svc/deliverableMetadata?product_url=btp&deliverable_url=ui-theme-designer&version=LATESTReturnsdata.deliverable.id(deliverable_id),data.deliverable.buildNo, anddata.filePath(landing page file path).Page content — fetches the HTML body of a single topic, and optionally the full hierarchical TOC:
GET https://help.sap.com/http.svc/pagecontent?deliverable_id={id}&buildNo={buildNo}&file_path={loio}.htmlReturnsdata.body(HTML). With the extra paramdeliverableInfo=1also returnsdata.deliverable.fullToc— a recursive tree of{t: title, u: filename, c: children[]}nodes covering all 80+ topics.
Procedure
Use curl -s to call all API endpoints, and jq to parse the JSON responses.
- Fetch deliverable metadata to obtain
deliverable_idandbuildNo:curl -s "https://help.sap.com/http.svc/deliverableMetadata?product_url=btp&deliverable_url=ui-theme-designer&version=LATEST" | jq '{id: .data.deliverable.id, buildNo: .data.deliverable.buildNo, filePath: .data.filePath}' - Fetch the landing page with
deliverableInfo=1to get the full TOC tree:curl -s "https://help.sap.com/http.svc/pagecontent?deliverableInfo=1&deliverable_id={id}&buildNo={buildNo}&file_path={filePath}" | jq '.data.deliverable.fullToc' - From the TOC, identify the topic(s) whose title best matches the user's question. If uncertain, pick 2–3 candidates.
- For each candidate, fetch its page content and strip HTML tags:
curl -s "https://help.sap.com/http.svc/pagecontent?deliverable_id={id}&buildNo={buildNo}&file_path={loio}.html" | jq -r '.data.body' | sed 's/<[^>]*>//g' | tr -s '\n' - Answer based on the retrieved content.