Skip to content
Sign in

REST API

Base URL: https://api-staging.product.cloud. The full route list is in the API reference, and the machine-readable spec is at /openapi.json (OpenAPI 3.1).

Authentication

Open repositories need no token. For restricted data, for writes, and for /v1/me, send a bearer token: a personal access token for scripts and CI, or a short-lived access token of your CLI session.

export PRODUCT_TOKEN=$(product auth token)        # a 10-minute access token of your CLI session
curl -s https://api-staging.product.cloud/v1/me -H "Authorization: Bearer $PRODUCT_TOKEN"

Personal access tokens

Long-lived, revocable tokens for scripts, notebooks, and CI. Create them with your own sign-in:

product token create ci-nightly                    # read-only, expires in 90 days; shown once
product token create loader --scope "repo:read artifact:read repo:write" --expires 30
product token list                                 # name, scope, status, expiry, last use
product token revoke pat_0123abcd…                 # stops working within a minute

Use the token exactly like an access token: export PRODUCT_TOKEN=pcp_… for the CLI, or Authorization: Bearer pcp_… with curl and HTTP libraries.

  • Scope: read-only by default (repo:read artifact:read org:read). A token never carries more than the session that created it, and cannot sign in or create further tokens.

  • Expiry: 1–365 days (default 90). Every token expires; create a new one before then.

  • Access: a token reads exactly what its owner may read, including restricted repositories granted to the owner or to the owner's organizations. Revoking the owner's access revokes the token's.

  • Storage: product.cloud keeps only a hash. Keep the token in a secret store; anyone holding it acts as you within its scope. At most 25 active tokens per person.

  • Over HTTP, tokens live at https://auth-staging.product.cloud/tokens (POST {name, scope?, expiresInDays?}, GET, DELETE /tokens/{id}) with a session access token.

Applications

  • Applications can use OAuth 2.0 (authorization code with PKCE, or the device flow) against https://auth-staging.product.cloud. Discovery is at https://auth-staging.product.cloud/.well-known/openid-configuration.

Reading data

RouteWhat
GET /v1/reposDiscoverable repositories (?namespace= filters)
GET /v1/repos/{ns}/{repo}One repository: card, license, tables with row counts, head, latest release
GET /v1/repos/{ns}/{repo}/releasesReleases with notes, semantic summary, and artifacts
GET /v1/repos/{ns}/{repo}/refsBranches and tags
GET /v1/repos/{ns}/{repo}/products?revision=&limit=&after=&q=&brand=Products at a revision, keyset paging (limit 1–500, default 50), with explorer filters
GET /v1/repos/{ns}/{repo}/products/{identifier}?revision=One product with its attributes and provenance, e.g. products/gtin:04012345678901
GET /v1/repos/{ns}/{repo}/classes/{code}One class of a classification
GET /v1/repos/{ns}/{repo}/mappings?source=Mappings for a source code
POST /v1/repos/{ns}/{repo}/queryFilter one table with a small JSON query (below)
GET /v1/repos/{ns}/{repo}/changes?after=&limit=Change feed: see Changes & sync
GET /v1/repos/{ns}/{repo}/dataset?revision=Parquet shard URLs of an open repository: see Downloads
GET /v1/repos/{ns}/{repo}/objects/{digest}One object (shard, manifest) by SHA-256, with access control
GET /v1/search?q=Identifier-first search across repositories (GTIN, class code, words)
GET /v1/products/resolve?identifier=gtin:…Every repository's claims about one product, with conflicts
GET /v1/entities/{id}An identity-graph entity with its claims and decisions

Examples:

curl -s "https://api-staging.product.cloud/v1/repos/acme/power-tools-eu/products?revision=2026.09&limit=2"
curl -s "https://api-staging.product.cloud/v1/repos/acme/power-tools-eu/products/gtin:04012345678901?revision=2026.09"
curl -s "https://api-staging.product.cloud/v1/products/resolve?identifier=gtin:04012345678901"

A product list page looks like this:

{"repository": "acme/power-tools-eu", "revision": {"requested": "2026.09", "commit": "sha256:…", "immutable": true},
 "total": 3, "products": [{"gtin": "04012345678901", "brand": "ACME", "mpn": "GSR-18", "name": "…", "attributeCount": 5}],
 "nextCursor": "…", "filters": [{"id": "brand", "options": [{"value": "ACME", "count": 3}]}]}

Products without a GTIN have keys like mpn:<brand>:<part number>.

Revisions

revision takes a tag (2026.09), a branch (main, the default), or sha256:<commit>. Responses name the commit they were computed from. A tag or commit answer never changes and can be cached forever; a branch answer is current.

Querying a table

POST /v1/repos/{ns}/{repo}/query takes a JSON query, not SQL:

curl -s https://api-staging.product.cloud/v1/repos/acme/power-tools-eu/query -H 'content-type: application/json' -d '{
  "table": "attributes", "select": ["gtin", "value", "unit"], "revision": "2026.09",
  "where": [{"column": "property", "op": "eq", "value": "weight"}], "limit": 100}'
  • Operators: eq, in (values, up to 100), prefix, and isNull; at most 8 conditions.

  • Paging: rows come in primary-key order; pass nextCursor back as after. limit is at most 1000.

  • Budget: tables larger than 64 MiB are refused with PRODUCT-QUERY-BUDGET. That includes large catalogues such as Icecat. Download those and query them locally instead.

Conventions

  • Paging: keyset (after = the previous page's nextCursor). Cursors are opaque.

  • ETags: refs (GET …/refs/heads/{branch}) and objects carry an ETag, which is the commit or digest. Branch updates use it for compare-and-set (If-Match).

  • Errors: RFC 9457 application/problem+json, with a stable code. Its type links to the error catalogue:

json {"type": "https://staging.product.cloud/docs/errors#product-unauthenticated", "title": "Unauthorized", "status": 401, "detail": "a valid access token is required", "code": "PRODUCT-UNAUTHENTICATED"}

  • Rate limits: 1200 reads and 240 writes per minute per caller. Signed-in callers are counted per user, anonymous ones per IP. When you are over the limit you get 429 with Retry-After.

  • Reporting problems: include the response's cf-ray header, the repository, and the time.

  • CORS: browser apps on any origin may call the API (Access-Control-Allow-Origin: *; ETag, Retry-After, Link, and Content-Range are readable). The API uses no cookies, so a page sees only what the token it sends allows. Don't put a personal access token into public web pages: anyone could copy it. Open Parquet shards are readable from browsers directly (see Downloads).