Home/Cookbook/Browse the catalog ENУКРРУС API Reference (ReDoc) ↗

Browse the catalog

List vendors, filter providers by capability, and read the schema you will store against.

The read-only warm-up: find a provider worth configuring and learn what its credential must look like. Everything here is catalog data — identical for every caller of your role.

Goal

End holding one provider's code and its credential_schema, having navigated vendors → filtered providers → full detail.

Prerequisites

Steps

1. List vendors

Call GET /v1/vendors:

curl -s "$CREDS_BASE/v1/vendors" -H "Authorization: Bearer $TOKEN"

Expected 200: items of vendor summaries plus catalog_version. As a regular role you see active and deprecated vendors (Vendors and Providers).

2. Filter providers by what they can do

Call GET /v1/providers with a capability filter:

curl -s "$CREDS_BASE/v1/providers?capability=translation&category=mt" \
  -H "Authorization: Bearer $TOKEN"

Expected 200: only providers whose capabilities.translation is true and whose category is mt; total counts all matches before paging.

3. Read one provider in full

Call GET /v1/providers/{provider_code} for a code from step 2:

import httpx

provider = httpx.get(
    f"{CREDS_BASE}/v1/providers/{code}",
    headers={"Authorization": f"Bearer {TOKEN}"},
).json()

assert provider["credential_schema"]["type"] == "object"
required = provider["credential_schema"].get("required", [])

Expected 200: the full card — vendor, both schemas, capabilities, credential_resolution, technical notes. required is exactly the list of secret fields the next scenario must send (Provider Schemas).

4. Prove the visibility boundary

Request a provider code that does not exist:

curl -s "$CREDS_BASE/v1/providers/no_such_provider" -H "Authorization: Bearer $TOKEN"

Expected 404 with error.code = "PROVIDER_NOT_FOUND" — the same answer a removed provider gives a regular role.

Verified by the test test_s01_browse_the_catalog.