> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wistx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Resources

> List all indexed resources for the user

> List all indexed resources for the user

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.wistx.ai/v1/indexing/resources?resource_type=repository&status=completed' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```python Python theme={null}
  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")
  ```

  ```javascript JavaScript theme={null}
  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`);
  ```

  ```go Go theme={null}
  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"])
  }
  ```

  ```ruby Ruby theme={null}
  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 PHP theme={null}
  <?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";
  ```

  ```java Java theme={null}
  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());
      }
  }
  ```
</CodeGroup>

### Query Parameters

<ParamField query="resource_type" type="string">
  Filter by resource type.

  **Options:** `repository`, `documentation`, `document`
</ParamField>

<ParamField query="status" type="string">
  Filter by indexing status.

  **Options:** `pending`, `indexing`, `completed`, `failed`
</ParamField>

<ParamField query="include_ai_analysis" type="boolean">
  Include AI-analyzed insights about resource collection.

  **Default:** `true`
</ParamField>

### Response

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "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
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "detail": "User ID not found"
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "detail": "Failed to list resources"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.