List Resources
curl --request GET \
--url https://api.wistx.ai/v1/indexing/resourcesimport requests
url = "https://api.wistx.ai/v1/indexing/resources"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.wistx.ai/v1/indexing/resources', 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.wistx.ai/v1/indexing/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.wistx.ai/v1/indexing/resources"
req, _ := http.NewRequest("GET", url, nil)
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.wistx.ai/v1/indexing/resources")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wistx.ai/v1/indexing/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"resources": [
{
"resource_id": "res_abc123",
"resource_type": "repository",
"name": "My Repository",
"repository": "owner/repo",
"branch": "main",
"status": "completed",
"progress": {
"percentage": 100,
"stage": "completed",
"message": "Indexing completed successfully"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"files_processed": 1250,
"total_files": 1250,
"storage_mb": 45.2
}
],
"total": 1
}
{
"detail": "User ID not found"
}
{
"detail": "Failed to list resources"
}
Indexing
List Resources
List all indexed resources for the user
GET
/
v1
/
indexing
/
resources
List Resources
curl --request GET \
--url https://api.wistx.ai/v1/indexing/resourcesimport requests
url = "https://api.wistx.ai/v1/indexing/resources"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.wistx.ai/v1/indexing/resources', 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.wistx.ai/v1/indexing/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.wistx.ai/v1/indexing/resources"
req, _ := http.NewRequest("GET", url, nil)
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.wistx.ai/v1/indexing/resources")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wistx.ai/v1/indexing/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"resources": [
{
"resource_id": "res_abc123",
"resource_type": "repository",
"name": "My Repository",
"repository": "owner/repo",
"branch": "main",
"status": "completed",
"progress": {
"percentage": 100,
"stage": "completed",
"message": "Indexing completed successfully"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"files_processed": 1250,
"total_files": 1250,
"storage_mb": 45.2
}
],
"total": 1
}
{
"detail": "User ID not found"
}
{
"detail": "Failed to list resources"
}
List all indexed resources for the user
curl --request GET \
--url 'https://api.wistx.ai/v1/indexing/resources?resource_type=repository&status=completed' \
--header 'Authorization: Bearer YOUR_API_KEY'
import requests
api_key = "YOUR_API_KEY"
url = "https://api.wistx.ai/v1/indexing/resources"
response = requests.get(
url,
headers={"Authorization": f"Bearer {api_key}"},
params={
"resource_type": "repository",
"status": "completed"
}
)
data = response.json()
print(f"Found {data['total']} indexed resources")
const apiKey = "YOUR_API_KEY";
const url = "https://api.wistx.ai/v1/indexing/resources";
const response = await fetch(
`${url}?resource_type=repository&status=completed`,
{
headers: {
Authorization: `Bearer ${apiKey}`
}
}
);
const data = await response.json();
console.log(`Found ${data.total} indexed resources`);
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
apiKey := "YOUR_API_KEY"
baseURL := "https://api.wistx.ai/v1/indexing/resources"
params := url.Values{}
params.Add("resource_type", "repository")
params.Add("status", "completed")
fullURL := baseURL + "?" + params.Encode()
req, _ := http.NewRequest("GET", fullURL, nil)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKey))
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("Found %v indexed resources\n", result["total"])
}
require 'net/http'
require 'json'
require 'uri'
api_key = "YOUR_API_KEY"
url = URI("https://api.wistx.ai/v1/indexing/resources?resource_type=repository&status=completed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer #{api_key}"
response = http.request(request)
data = JSON.parse(response.body)
puts "Found #{data['total']} indexed resources"
<?php
$apiKey = "YOUR_API_KEY";
$url = "https://api.wistx.ai/v1/indexing/resources?resource_type=repository&status=completed";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer " . $apiKey
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo "Found " . $data['total'] . " indexed resources";
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class ListResources {
public static void main(String[] args) throws Exception {
String apiKey = "YOUR_API_KEY";
URL url = new URL("https://api.wistx.ai/v1/indexing/resources?resource_type=repository&status=completed");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("Authorization", "Bearer " + apiKey);
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
StringBuilder response = new StringBuilder();
String responseLine;
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}
System.out.println(response.toString());
}
}
Query Parameters
string
Filter by resource type.Options:
repository, documentation, documentstring
Filter by indexing status.Options:
pending, indexing, completed, failedboolean
Include AI-analyzed insights about resource collection.Default:
trueResponse
{
"resources": [
{
"resource_id": "res_abc123",
"resource_type": "repository",
"name": "My Repository",
"repository": "owner/repo",
"branch": "main",
"status": "completed",
"progress": {
"percentage": 100,
"stage": "completed",
"message": "Indexing completed successfully"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"files_processed": 1250,
"total_files": 1250,
"storage_mb": 45.2
}
],
"total": 1
}
{
"detail": "User ID not found"
}
{
"detail": "Failed to list resources"
}