Explore context
curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"filters": {
"shape_ids": [],
"entity_types": [],
"relationship_types": [],
"file_ids": [],
"file_shapes": []
},
"sort": "newest",
"date": {},
"limit": 50,
"relationship_limit": 200,
"cursor": "<string>",
"file_surface": "<string>"
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore"
payload = {
"query": "<string>",
"filters": {
"shape_ids": [],
"entity_types": [],
"relationship_types": [],
"file_ids": [],
"file_shapes": []
},
"sort": "newest",
"date": {},
"limit": 50,
"relationship_limit": 200,
"cursor": "<string>",
"file_surface": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
filters: {
shape_ids: [],
entity_types: [],
relationship_types: [],
file_ids: [],
file_shapes: []
},
sort: 'newest',
date: {},
limit: 50,
relationship_limit: 200,
cursor: '<string>',
file_surface: '<string>'
})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore', 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://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'filters' => [
'shape_ids' => [
],
'entity_types' => [
],
'relationship_types' => [
],
'file_ids' => [
],
'file_shapes' => [
]
],
'sort' => 'newest',
'date' => [
],
'limit' => 50,
'relationship_limit' => 200,
'cursor' => '<string>',
'file_surface' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"filters\": {\n \"shape_ids\": [],\n \"entity_types\": [],\n \"relationship_types\": [],\n \"file_ids\": [],\n \"file_shapes\": []\n },\n \"sort\": \"newest\",\n \"date\": {},\n \"limit\": 50,\n \"relationship_limit\": 200,\n \"cursor\": \"<string>\",\n \"file_surface\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"filters\": {\n \"shape_ids\": [],\n \"entity_types\": [],\n \"relationship_types\": [],\n \"file_ids\": [],\n \"file_shapes\": []\n },\n \"sort\": \"newest\",\n \"date\": {},\n \"limit\": 50,\n \"relationship_limit\": 200,\n \"cursor\": \"<string>\",\n \"file_surface\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"filters\": {\n \"shape_ids\": [],\n \"entity_types\": [],\n \"relationship_types\": [],\n \"file_ids\": [],\n \"file_shapes\": []\n },\n \"sort\": \"newest\",\n \"date\": {},\n \"limit\": 50,\n \"relationship_limit\": 200,\n \"cursor\": \"<string>\",\n \"file_surface\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"schema": "penumbra.project-context-explorer-page",
"version": 1,
"entities": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"description": "<string>",
"revision": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"shape": {
"shape_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_digest": "<string>",
"name": "<string>",
"description": "<string>",
"type_description": "<string>"
},
"files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content_digest": "<string>",
"chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>"
}
],
"time": {
"revision": 123,
"valid_time": {
"property": "<string>",
"valid_from": "<string>",
"valid_to": "<string>",
"how": "<string>"
},
"due_time": {
"property": "<string>",
"due_on": "<string>",
"how": "<string>"
},
"source_time": {
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_date": "<string>"
}
}
}
],
"relationships": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"revision": 123,
"shape": {
"shape_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_digest": "<string>",
"name": "<string>",
"description": "<string>",
"type_description": "<string>"
}
}
],
"page": {
"has_more": true,
"next_cursor": "<string>",
"relationships_truncated": true,
"mode": "overview",
"loaded_count": 100,
"bounded": true
}
}
}Search and citations
Explore context
Explore the project context around a question or entity.
Explore context
curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"filters": {
"shape_ids": [],
"entity_types": [],
"relationship_types": [],
"file_ids": [],
"file_shapes": []
},
"sort": "newest",
"date": {},
"limit": 50,
"relationship_limit": 200,
"cursor": "<string>",
"file_surface": "<string>"
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore"
payload = {
"query": "<string>",
"filters": {
"shape_ids": [],
"entity_types": [],
"relationship_types": [],
"file_ids": [],
"file_shapes": []
},
"sort": "newest",
"date": {},
"limit": 50,
"relationship_limit": 200,
"cursor": "<string>",
"file_surface": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
filters: {
shape_ids: [],
entity_types: [],
relationship_types: [],
file_ids: [],
file_shapes: []
},
sort: 'newest',
date: {},
limit: 50,
relationship_limit: 200,
cursor: '<string>',
file_surface: '<string>'
})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore', 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://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'filters' => [
'shape_ids' => [
],
'entity_types' => [
],
'relationship_types' => [
],
'file_ids' => [
],
'file_shapes' => [
]
],
'sort' => 'newest',
'date' => [
],
'limit' => 50,
'relationship_limit' => 200,
'cursor' => '<string>',
'file_surface' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"filters\": {\n \"shape_ids\": [],\n \"entity_types\": [],\n \"relationship_types\": [],\n \"file_ids\": [],\n \"file_shapes\": []\n },\n \"sort\": \"newest\",\n \"date\": {},\n \"limit\": 50,\n \"relationship_limit\": 200,\n \"cursor\": \"<string>\",\n \"file_surface\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"filters\": {\n \"shape_ids\": [],\n \"entity_types\": [],\n \"relationship_types\": [],\n \"file_ids\": [],\n \"file_shapes\": []\n },\n \"sort\": \"newest\",\n \"date\": {},\n \"limit\": 50,\n \"relationship_limit\": 200,\n \"cursor\": \"<string>\",\n \"file_surface\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/context/explore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"filters\": {\n \"shape_ids\": [],\n \"entity_types\": [],\n \"relationship_types\": [],\n \"file_ids\": [],\n \"file_shapes\": []\n },\n \"sort\": \"newest\",\n \"date\": {},\n \"limit\": 50,\n \"relationship_limit\": 200,\n \"cursor\": \"<string>\",\n \"file_surface\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"schema": "penumbra.project-context-explorer-page",
"version": 1,
"entities": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"description": "<string>",
"revision": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"shape": {
"shape_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_digest": "<string>",
"name": "<string>",
"description": "<string>",
"type_description": "<string>"
},
"files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content_digest": "<string>",
"chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>"
}
],
"time": {
"revision": 123,
"valid_time": {
"property": "<string>",
"valid_from": "<string>",
"valid_to": "<string>",
"how": "<string>"
},
"due_time": {
"property": "<string>",
"due_on": "<string>",
"how": "<string>"
},
"source_time": {
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_date": "<string>"
}
}
}
],
"relationships": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"revision": 123,
"shape": {
"shape_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_digest": "<string>",
"name": "<string>",
"description": "<string>",
"type_description": "<string>"
}
}
],
"page": {
"has_more": true,
"next_cursor": "<string>",
"relationships_truncated": true,
"mode": "overview",
"loaded_count": 100,
"bounded": true
}
}
}Operation ID:
http.context.explore
POST /v1/orgs/{org}/projects/{project}/context/explore
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Available options:
overview, query Maximum string length:
2048Show child attributes
Show child attributes
Available options:
newest, oldest, created, modified Show child attributes
Show child attributes
Required range:
1 <= x <= 200Required range:
0 <= x <= 400Required string length:
1 - 2048Pattern:
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Response
2XX - application/json
Success.
Show child attributes
Show child attributes