SPB Git forge

spb/doc-api

Public
2commits 1branches 0releases
15.7 MBsize
maindefault branch
14 days agolast push
Python 88.3% TypeScript 7.6% Shell 4.1%
764 B · 12 lines shellscript
Raw Blame History
1#!/usr/bin/env bash2# STATUS: LIVE_VERIFIED — executed 2026-09-19 (exit 0 in 0.4s)3# POST /v1/documents/search shape (api.x.ai, inference key). With a non-existent collection the API answers 404 not-found — recorded on purpose.4set -euo pipefail5cd "$(dirname "$0")/../../.."6source scripts/lib.sh7T=$(mktemp); trap 'rm -f "$T"' EXIT8xai POST /v1/documents/search -d '{"query":"quarterly revenue","source":{"collection_ids":["collection_00000000-0000-0000-0000-000000000000"]},"limit":3,"retrieval_mode":{"type":"hybrid"}}' > "$T"9log_request xai POST /v1/documents/search "$XAI_STATUS" 0 "example xai/collections/search.sh (fake collection → 404 expected)"10echo "status $XAI_STATUS"; mask < "$T"; echo11[ "$XAI_STATUS" = "404" ] || [ "$XAI_STATUS" = "200" ]12