For the complete documentation index, see llms.txt. This page is also available as Markdown.

Lenses API Spec

API reference documentation for Lenses.

HQ has its own set of APIs, but it also proxies requests to the agents.

Calls to a specific environment or agent require prefixing the proxy URL to the agent API.

get

Proxies HTTP to a Lenses instance. Note: this is not a regular HTTP API endpoint. The path specified here is a prefix. Everything beneath it gets proxied to the corresponding Lenses instance. Any request body and method (the GET here is only a placeholder) are accepted, as long as the Lenses API accepts it. The connection can even be upgraded to a websocket. The status code and response body are controlled by the Lenses API. This concept does not fit into the OpenAPI world at all; this definition is only here for the sake of documentation to avoid having an undocumented dark matter API.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired
Responses
default

Error object.

application/json

Implements the RFC7807 "Problem Details", see https://www.rfc-editor.org/rfc/rfc7807.

typestring · enumOptional

Enumerates possible error types.

Possible values:
titlestringRequired

Describes the problem in a human readable fashion.

statusintegerRequired

Is a copy of the http status code.

sso_urlstringOptional

Contains in case of an "unauthorised" type of error, the url of the SSO provider, if any.

request_idstringOptional

Is set to the id of this request. Can be used to correlate backend logs.

get/v1/environments/{name}/proxy/
GET /api/v1/environments/{name}/proxy/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
default

Error object.

{
  "type": "not_found",
  "title": "text",
  "status": 1,
  "invalid_fields": [
    {
      "name": "text",
      "error": "reference_not_found",
      "title": "text"
    }
  ],
  "sso_url": "text",
  "request_id": "text"
}

Last updated

Was this helpful?