Read status first, then msg
Most API answers are JSON with a status field. true means it worked; false means it did not, and msg holds a code that says why.
{
"status": false,
"msg": "ERROR_AUTHENTICATION_FAILED"
}
The HTTP codes
| HTTP | msg | What it means |
|---|---|---|
| 200 | status: true | It worked. The result is in msg or in fields of the endpoint, such as results. |
| 200 | ERROR_... | The request was wrong: a missing parameter, an index you do not own, a plan limit. Each article of the endpoint lists its codes. |
| 403 | ERROR_AUTHENTICATION_FAILED | The email and API key do not match. |
| 403 | ERROR_SCOPED_KEY_ENDPOINT_NOT_ALLOWED, ERROR_SCOPED_KEY_CORE_NOT_ALLOWED | A scoped key was used for an endpoint or an index it does not cover. |
| 403 | VECTOR_NOT_ALLOWED | AI is switched off on the plan of the index owner. Nothing ran and nothing was counted. |
| 404 | WRONG_API_HOST | The method lives on the other host. The answer carries correct_host and correct_url. |
| 429 | ERROR_RATE_LIMIT_PER_MINUTE, ERROR_RATE_LIMIT_PER_HOUR | Too many calls. Wait for Retry-After seconds. See Rate limits. |
| 429 | ERROR_AI_MONTHLY_QUOTA_EXCEEDED | The monthly AI allowance is used up. See API Quota. |
Good to know
- Check
statuson every answer: an HTTP 200 alone does not mean it worked. - A few older endpoints answer with plain text or an empty body instead of JSON. Their articles show the exact answer.
- A management method called on api.opensolr.com answers a plain 404 Not Found page.