Hey when I try to connect to the groq tool (<https://abc123.api.sanity.io/v1/groq/development>) by clicking the link from the dashboard running on my local, I get an error...

4 replies
Last updated: Oct 29, 2020
Hey when I try to connect to the groq tool (https://abc123.api.sanity.io/v1/groq/development ) by clicking the link from the dashboard running on my local, I get an error like
{"message":"no API found with those values"}
. Anyone know what that means? Should I be able to do that at all?
AI Update

The error "no API found with those values" you're seeing happens because /v1/groq/development isn't a valid Sanity API endpoint. That URL format doesn't exist in Sanity's HTTP API structure.

The correct endpoint format for querying content via GROQ is:

https://abc123.api.sanity.io/<version>/data/query/<dataset>

So you'd need something like:

https://abc123.api.sanity.io/v2024-12-01/data/query/production?query=*[_type == "post"]

Key things to fix:

  1. Use the proper path: /data/query/ instead of /groq/
  2. Include an API version: Like v2024-12-01 or v2021-06-07 (check API versioning docs)
  3. Use your actual dataset name: Replace development with your real dataset name (usually production - check your sanity.config.ts file)
  4. Add a query parameter: Include ?query=YOUR_GROQ_QUERY
  5. Include authentication: You'll need a token with viewer permissions, either as ?token=... or in an Authorization header

Better approach for testing: Instead of clicking raw API links, use the Vision plugin in your Studio (usually at http://localhost:3333/vision). It gives you a much better query testing experience with syntax highlighting, autocomplete, and formatted results.

The link you clicked from the dashboard was probably a placeholder or malformed URL - the /groq/development path structure simply doesn't exist in Sanity's API architecture.

Hi
user A
that's an error in the dashboard widget. The url should be:

https://<projectId>.<http://api.sanity.io/v1/data/query/production?query=your-query|api.sanity.io/v1/data/query/production?query=your-query>
The link is not to a GROQ tool, but it's an API endpoint for GROQ queries
ah cool, thanks
That's for reporting, we'll get that fixed ASAP!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?