Fetch one resource live
curl --request GET \
--url https://api.hyperspell.com/live/{source}/resources/{resource_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperspell.com/live/{source}/resources/{resource_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hyperspell.com/live/{source}/resources/{resource_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://api.hyperspell.com/live/{source}/resources/{resource_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://api.hyperspell.com/live/{source}/resources/{resource_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://api.hyperspell.com/live/{source}/resources/{resource_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperspell.com/live/{source}/resources/{resource_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{
"documents": [
{
"resource_id": "<string>",
"type": "<string>",
"document": {
"type": "document",
"id": "<string>",
"metadata": {
"sources": [
{
"chunk_id": "<string>",
"resource_id": "<string>",
"source": "<string>",
"score": 123
}
],
"edited_by": "<string>"
},
"text": "<string>",
"children": [
{
"mimetype": "<string>",
"data": "<string>",
"type": "blob",
"id": "<string>",
"metadata": {
"sources": [
{
"chunk_id": "<string>",
"resource_id": "<unknown>",
"source": "<unknown>",
"score": "<unknown>"
}
],
"edited_by": "<string>"
}
}
],
"title": "<string>"
},
"title": "<string>",
"collection": "<string>",
"metadata": {},
"ingested_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z"
}
],
"indexed": false,
"notes": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Live
Fetch one resource live
Fetch one resource live by id. A single fetch may fan out into several resources (e.g. a thread → its messages); all are returned.
GET
/
live
/
{source}
/
resources
/
{resource_id}
Fetch one resource live
curl --request GET \
--url https://api.hyperspell.com/live/{source}/resources/{resource_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperspell.com/live/{source}/resources/{resource_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hyperspell.com/live/{source}/resources/{resource_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://api.hyperspell.com/live/{source}/resources/{resource_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://api.hyperspell.com/live/{source}/resources/{resource_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://api.hyperspell.com/live/{source}/resources/{resource_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperspell.com/live/{source}/resources/{resource_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{
"documents": [
{
"resource_id": "<string>",
"type": "<string>",
"document": {
"type": "document",
"id": "<string>",
"metadata": {
"sources": [
{
"chunk_id": "<string>",
"resource_id": "<string>",
"source": "<string>",
"score": 123
}
],
"edited_by": "<string>"
},
"text": "<string>",
"children": [
{
"mimetype": "<string>",
"data": "<string>",
"type": "blob",
"id": "<string>",
"metadata": {
"sources": [
{
"chunk_id": "<string>",
"resource_id": "<unknown>",
"source": "<unknown>",
"score": "<unknown>"
}
],
"edited_by": "<string>"
}
}
],
"title": "<string>"
},
"title": "<string>",
"collection": "<string>",
"metadata": {},
"ingested_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z"
}
],
"indexed": false,
"notes": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
APIKeyAsUser
API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.
Path Parameters
Available options:
reddit, notion, slack, google_calendar, google_mail, box, dropbox, github, google_drive, vault, web_crawler, trace, microsoft_teams, gmail_actions, granola, fathom, fireflies, linear, hubspot, salesforce, coda, lightfield, gong, pylon, clickup Query Parameters
Also queue this resource for indexing.
Specific connection id.
Was this page helpful?
⌘I