Skip to main content
Interania

Query API troubleshooting

0votes
8updates
388views

You read the Interana API documentation, you tried to send a request, and...something went wrong! Here are a couple things to check.

What kind of error are you getting?

The response code and error message you see can tell you a lot about what the problem might be.

"404: Not found" or "Could not resolve host" errors might be caused by sending the request to the wrong endpoint. You should use the endpoint https://<your interana instance URL>/api/v1/query. 

"401 Unauthorized: Not using authentication token" might mean there's a problem with the header. You might want to double-check how you're formatting the authorization portion. 

"401 Unauthorized: Not logged in" errors might mean that you have mistyped your token, or that it is not valid. 

"403 Forbidden: not authorized" errors might mean that you are trying to query against a dataset that doesn't exist or that you don't have permission to access. 

"400 Bad Request" errors could be caused by many different things, so you should definitely check the error message. Check out the tips below if you're stuck. 

A couple other things to check...

  • Request type: you should send an HTTP GET request with the query object as URL-encoded parameter.

  • Spelling! For example, if your query uses a filter, make sure your key says "filter," not "filters." Also, your top-level object is called "query," but the nested array is called "queries." Check the Query API documentation to make sure everything matches up.
  • Special characters: if your request uses any special characters, make sure you are escaping them properly. For example, any filter text you include needs to be surrounded by escaped double quotes. 
  • Column names: if you reference a column that has a familiar ("friendly") name that differs from its source name, you should use the familiar name in your request. 
  • Encoding: make sure you send the query object as a URL-encoded parameter!
  • Timestamps: make sure your start and end times are formatted as epoch timestamps in milliseconds

Still stuck?

Refer back to the Query API documentation, post in the discussion forum, or contact us at help@interana.com!

  • Was this article helpful?