List documents
curl --request GET \
--url https://api.hq.zone/v1/api/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/api/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hq.zone/v1/api/documents', 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.hq.zone/v1/api/documents",
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.hq.zone/v1/api/documents"
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.hq.zone/v1/api/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/api/documents")
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{
"categories": [
"<string>"
],
"documents": [
{
"auto_categorized": true,
"classification_status": "<string>",
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>",
"filename": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_owner": true,
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_version": "<string>",
"reference_numbers": [
"<string>"
],
"scope": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"tags": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z",
"analysis_strategy": "<string>",
"caption": "<string>",
"category": "<string>",
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_name": "<string>",
"classification_confidence": 123,
"document_date": "2023-11-07T05:31:56Z",
"entities": "<unknown>",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"language": "<string>",
"owner_display": "<string>",
"source_ref": "<string>",
"source_url": "<string>",
"summary": "<string>"
}
],
"tags": [
"<string>"
]
}Documents
List documents
Returns the documents visible to the caller, newest first, along with the distinct categories and tags across that visible set for building filter sidebars. Visibility is enforced per request: team-scoped documents are seen by everyone in the workspace, private ones only by their owner, and channel-scoped ones only by members of that channel. Optional query parameters scope, category, channel, and tags (comma-separated, matching documents that carry all listed tags) narrow the results, and limit defaults to 50 and is capped at 200. Requires the documents:read scope.
GET
/
v1
/
api
/
documents
List documents
curl --request GET \
--url https://api.hq.zone/v1/api/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/api/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hq.zone/v1/api/documents', 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.hq.zone/v1/api/documents",
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.hq.zone/v1/api/documents"
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.hq.zone/v1/api/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/api/documents")
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{
"categories": [
"<string>"
],
"documents": [
{
"auto_categorized": true,
"classification_status": "<string>",
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>",
"filename": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_owner": true,
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_version": "<string>",
"reference_numbers": [
"<string>"
],
"scope": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"tags": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z",
"analysis_strategy": "<string>",
"caption": "<string>",
"category": "<string>",
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_name": "<string>",
"classification_confidence": 123,
"document_date": "2023-11-07T05:31:56Z",
"entities": "<unknown>",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"language": "<string>",
"owner_display": "<string>",
"source_ref": "<string>",
"source_url": "<string>",
"summary": "<string>"
}
],
"tags": [
"<string>"
]
}Authorizations
bearer_patoauth2