# API - Listing Files

When query calls point to a directory, as mentioned in the API interaction section, they will need to be ended with a '/'.&#x20;

Getting a list of files from a directory enables optional query string specifications in order to manage and organize these lists according to the following syntax:

`https://test-001-node.cloud.nxtfi.org/v2/<ENDPOINT>/?raw=<true>&startafter=<key>&maxkeys=<number>`

## If no query string is declared, default listing is ascendent-alphabetical order.&#x20;

<mark style="color:blue;">`GET`</mark> `https://test-001-node.cloud.nxtfi.org/v2/<ENDPOINT>/?<query-string-options-and-values>`

If a query string is declared in order to be valid must have a `=` between the query name and its value

#### Query Parameters

| Name       | Type    | Description                                                                  |
| ---------- | ------- | ---------------------------------------------------------------------------- |
| raw        | Boolean | returns listed items in native structure                                     |
| startafter | String  | Return keys starting after designated value. Alphabetical order.             |
| maxkeys    | Number  | Return designated max keys values. Default and max on each query 1000 items. |

### Listing trace interaction:&#x20;

The system for monitoring interactions is listed in a slightly different way. For more information on tracing, please refer to the [Storage tracking interactions](/api-reference/storage-tracking-interactions.md) section.&#x20;

Interactions with the NxtFi file system are stored in tracking directories that point to a specific file. This means that a single stored value may have a list of tracking files related to its manipulation.&#x20;

Therefore, when listing the tracking information of a specific file, its query must include "/" endings as they are fixed directories to their "parent" element.

For example  `SUCCESS`:

<https://test-001-node.cloud.nxtfi.org/v2/\\_trace/\\><scope>/\<fileName>/

<https://test-001-node.cloud.nxtfi.org/v2/\\_trace/\\><scope>/\<fileName>/\<timestamp>

For example  `{"error": "notFound"}`:

<mark style="color:orange;"><https://test-001-node.cloud.nxtfi.org/v2/\\_trace/\\><scope>/\<filename></mark>

<mark style="color:orange;"><https://test-001-node.cloud.nxtfi.org/v2/\\_trace/\\><scope>/\<file>/timestamp/</mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nxtfi.org/api-listing-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
