> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.twelvelabs.io/v1.3/api-reference/knowledge-store-items/list/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.twelvelabs.io/_mcp/server. # List knowledge store items GET https://api.twelvelabs.io/v1.3/knowledge-stores/{knowledge_store_id}/items This method returns a list of items in the specified knowledge store. Reference: https://docs.twelvelabs.io/api-reference/knowledge-store-items/list ## Authentication - `x-api-key` header (required) — Your API key. You can find your API key on the API Keys page. ## Request ### Path parameters - `knowledge_store_id` (string, required) — The unique identifier of the knowledge store. ### Query parameters - `page` (integer, optional, default: 1) — A number that identifies the page to retrieve. **Default**: `1`. - `page_limit` (integer, optional, default: 10) — The number of items to return on each page. **Default**: `10`. **Max**: `50`. - `sort_by` (enum, optional, default: created_at) — The field to sort on. The following options are available: - `created_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was created. - `updated_at`: Sorts by the time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), when the item was last updated. **Default**: `created_at`. - Allowed values: `created_at`, `updated_at` - `sort_option` (string, optional, default: desc) — The sorting direction. The following options are available: - `asc` - `desc` **Default**: `desc`. - `status` (list of enum, optional) — Filter by one or more item processing statuses. For the meaning of each value, see the [Item statuses](/v1.3/api-reference/knowledge-store-items/the-knowledge-store-item-object#item-statuses) section on **The knowledge store item object** page. To filter by multiple statuses, repeat the `status` parameter for each value: ``` status=queued&status=pending ``` - Allowed values: `queued`, `pending`, `processing`, `ready`, `failed` ## Response ### 200 The knowledge store items have been successfully retrieved. - `data` (list of KnowledgeStoreItem, optional) — An array containing the knowledge store items. - `page_info` (page_info, optional) — An object that provides information about pagination. ## Errors ### 400 Bad Request Error The request has failed. - `code` (string, optional) — A string representing the code associated with the error. See the [Error codes](/v1.3/api-reference/error-codes) page for details. - `message` (string, optional) — A human-readable string describing the error, intended to be suitable for display in a user interface. ## Types ### KnowledgeStoreItem A knowledge store item is an asset added to a knowledge store for processing. You can use it in different workflows once its `status` is `ready`. - `asset_type` (enum, required) — The type of item. - Allowed values: `video`, `image` - `_id` (string, optional) — The unique identifier of the knowledge store item. - `asset_id` (string, optional) — The unique identifier of the source asset. - `status` (enum, optional) — The processing status of the item. For the meaning of each value, see the [Item statuses](/v1.3/api-reference/knowledge-store-items/the-knowledge-store-item-object#item-statuses) section on **The knowledge store item object** page. - Allowed values: `queued`, `pending`, `processing`, `ready`, `failed` - `system_metadata` (KnowledgeStoreItemSystemMetadata, optional) — System-generated media metadata for the source asset. Its `asset_type` field always matches the item's top-level `asset_type` field. - `metadata` (map from string to KnowledgeStoreMetadataValue, optional) — Custom metadata for the item. Keys are strings; each value is a string, a number, a boolean, or an array of strings. - `created_at` (string, optional) — The date and time when the item was created, in the RFC 3339 format. - `updated_at` (string, optional) — The date and time when the item was last updated, in the RFC 3339 format. ### page_info An object that provides information about pagination. - `limit_per_page` (integer, optional) — The maximum number of items on each page. - `page` (integer, optional) — The page you retrieved. - `total_page` (integer, optional) — The total number of pages. - `total_results` (integer, optional) — The total number of results. ### KnowledgeStoreItemSystemMetadata System-generated media metadata for the source asset. Its `asset_type` field always matches the item's top-level `asset_type` field. - `asset_type`: `video` (video) - `codec_name` (string, optional) — The codec used to encode the video. - `duration` (double, optional) — The duration of the video in seconds. - `filename` (string, optional) — The original filename of the video. - `fps` (double, optional) — The frame rate of the video in frames per second. - `height` (integer, optional) — The height of the video in pixels. - `size` (integer, optional) — The file size of the video in bytes. - `width` (integer, optional) — The width of the video in pixels. - `asset_type`: `image` (image) - `codec_name` (string, optional) — The codec used to encode the image. - `filename` (string, optional) — The original filename of the image. - `height` (integer, optional) — The height of the image in pixels. - `size` (integer, optional) — The file size of the image in bytes. - `width` (integer, optional) — The width of the image in pixels. ### KnowledgeStoreMetadataValue A single custom-metadata value: a string, a number, a boolean, or an array of strings. The value keeps the JSON type sent; a nested object, an array containing anything other than strings, and a null value are rejected. An integer must fit in 53 bits (-9007199254740991 to 9007199254740991). A wider integer, or an identifier that must be preserved verbatim, must be sent as a string. ## Examples **Response** ```json { "data": [ { "asset_type": "video", "_id": "ksi_069e9870-3c4d-7abc-9012-3456789abcde", "asset_id": "6298d673f1090f1100476d4c", "status": "ready", "system_metadata": { "asset_type": "video", "codec_name": "h264", "duration": 531.998133, "filename": "01.mp4", "fps": 29.97, "height": 1080, "size": 65749715, "width": 1920 }, "metadata": {}, "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z" } ], "page_info": { "limit_per_page": 10, "page": 1, "total_page": 1, "total_results": 2 } } ``` **SDK Code** ```python import requests url = "https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items" querystring = {"sort_by":"created_at"} headers = {"x-api-key": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items?sort_by=created_at'; const options = {method: 'GET', headers: {'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items?sort_by=created_at" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items?sort_by=created_at") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items?sort_by=created_at") .header("x-api-key", "") .asString(); ``` ```php request('GET', 'https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items?sort_by=created_at', [ 'headers' => [ 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items?sort_by=created_at"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["x-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.twelvelabs.io/v1.3/knowledge-stores/ks_069e9869-1ea3-7481-8000-dae72bf6be6e/items?sort_by=created_at")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```