Fetching Context Groups

Context groups in the Hyper app serve as collections of data aggregated from files, web URLs, and third-party integrations. They play a crucial role in refining search results and tailoring the contextual data provided to large language models.

GET /v1/contexts

You can fetch all of your context groups by making a GET request to the /v1/contexts endpoint. Below is an example of how to do this using cURL:

curl -X GET https://api.gethyper.ai/v1/contexts \
  -H "Authorization: Bearer {your_api_key}" \
  -H "Content-Type: application/json"

In this example, replace {your_api_key} with your actual API key. Remember to keep your API key secure at all times and reset it immediately if you suspect it has been compromised.

Response

The response will be an array of objects, where each object represents a context group. Each context group has an id and a name. Here’s an example of what the response might look like:

Example response:

Example response

[
  {
    "created_at": "2023-10-28T04:28:13.971776+00:00",
    "id": "f03f7113-d60e-472f-a266-8e0a1f091386",
    "name": "Data Analysis"
  },
  {
    "created_at": "2023-11-02T22:18:44.978052+00:00",
    "id": "a26d4182-4494-4ebc-b19f-1633fddc81d7",
    "name": "Project Management"
  },
  {
    "created_at": "2023-10-24T16:33:47.689614+00:00",
    "id": "62df1b77-07e9-40e1-8de8-14f2075309e5",
    "name": "Human Resources"
  }
]