Get context
curl --request GET \
--url https://apigcp.trynia.ai/v2/contexts/{context_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apigcp.trynia.ai/v2/contexts/{context_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigcp.trynia.ai/v2/contexts/{context_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigcp.trynia.ai/v2/contexts/{context_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apigcp.trynia.ai/v2/contexts/{context_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apigcp.trynia.ai/v2/contexts/{context_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigcp.trynia.ai/v2/contexts/{context_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"user_id": "<string>",
"title": "<string>",
"summary": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"agent_source": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"metadata": {},
"organization_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"nia_references": {
"indexed_resources": [
{
"identifier": "<string>",
"resource_type": "<string>",
"purpose": "<string>",
"indexed_at": "<string>"
}
],
"search_queries": [
{
"query": "<string>",
"query_type": "<string>",
"key_findings": "<string>",
"resources_searched": [
"<string>"
],
"useful_results_count": 0
}
],
"session_summary": "<string>"
},
"edited_files": [
{
"file_path": "<string>",
"operation": "<string>",
"changes_description": "<string>",
"key_changes": [
"<string>"
],
"language": "<string>"
}
],
"memory_type": "episodic",
"expires_at": "2023-11-07T05:31:56Z",
"lineage": {
"created_at": "2023-11-07T05:31:56Z",
"source_ids": [
"<string>"
],
"confidence": 123,
"derived_from": [
"<string>"
],
"tool_calls": [
"<string>"
],
"model_version": "<string>"
},
"category_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Context Sharing
Get context
Retrieve a specific context by ID.
GET
/
contexts
/
{context_id}
Get context
curl --request GET \
--url https://apigcp.trynia.ai/v2/contexts/{context_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apigcp.trynia.ai/v2/contexts/{context_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigcp.trynia.ai/v2/contexts/{context_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigcp.trynia.ai/v2/contexts/{context_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apigcp.trynia.ai/v2/contexts/{context_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apigcp.trynia.ai/v2/contexts/{context_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigcp.trynia.ai/v2/contexts/{context_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"user_id": "<string>",
"title": "<string>",
"summary": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"agent_source": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"metadata": {},
"organization_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"nia_references": {
"indexed_resources": [
{
"identifier": "<string>",
"resource_type": "<string>",
"purpose": "<string>",
"indexed_at": "<string>"
}
],
"search_queries": [
{
"query": "<string>",
"query_type": "<string>",
"key_findings": "<string>",
"resources_searched": [
"<string>"
],
"useful_results_count": 0
}
],
"session_summary": "<string>"
},
"edited_files": [
{
"file_path": "<string>",
"operation": "<string>",
"changes_description": "<string>",
"key_changes": [
"<string>"
],
"language": "<string>"
}
],
"memory_type": "episodic",
"expires_at": "2023-11-07T05:31:56Z",
"lineage": {
"created_at": "2023-11-07T05:31:56Z",
"source_ids": [
"<string>"
],
"confidence": 123,
"derived_from": [
"<string>"
],
"tool_calls": [
"<string>"
],
"model_version": "<string>"
},
"category_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Successful Response
Response model for context operations.
Was this page helpful?

