> For the complete documentation index, see [llms.txt](https://docs.m-xr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.m-xr.com/marso-studio-api/getting-started/library.md).

# Library

The public API groups PBR assets by project. Follow `pagination.next_cursor` for more pages and inspect `ungrouped_assets` after the project groups. Filter the returned `name` field in your client to search. `GET /assets` returns each group with its `group_id`, name, and assets.

**Search by name**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -sS "$MARSO_API_BASE_URL/assets?limit=25" \
  -H "Authorization: Bearer $MARSO_API_KEY" | jq '.data[].assets[] | select(.name | test("chair"; "i"))'
```

{% endtab %}

{% tab title="Python" %}

```python
groups = requests.get(f"{base}/assets?limit=25", headers=headers, timeout=30).json()["data"]
assets = [asset for group in groups for asset in group["assets"]]
matches = [asset for asset in assets if "chair" in asset["name"].lower()]
print(matches)
```

{% endtab %}

{% tab title="Go" %}

```go
req, _ := http.NewRequest(http.MethodGet, base+"/assets?limit=25", nil)
req.Header.Set("Authorization", "Bearer "+key)
```

{% endtab %}
{% endtabs %}

**List projects**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -sS "$MARSO_API_BASE_URL/assets?limit=25" \
  -H "Authorization: Bearer $MARSO_API_KEY" | jq '.data[] | {id: .group_id, name, assets: (.assets | length)}'
```

{% endtab %}

{% tab title="Python" %}

```python
projects = requests.get(f"{base}/assets?limit=25", headers=headers, timeout=30).json()["data"]
print(projects)
```

{% endtab %}

{% tab title="Go" %}

```go
req, _ := http.NewRequest(http.MethodGet, base+"/assets?limit=25", nil)
req.Header.Set("Authorization", "Bearer "+key)
```

{% endtab %}
{% endtabs %}

**List assets in a project**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -sS "$MARSO_API_BASE_URL/assets?limit=25" \
  -H "Authorization: Bearer $MARSO_API_KEY" | jq '.data[] | select(.group_id == "<project-id>") | .assets'
```

{% endtab %}

{% tab title="Python" %}

```python
response = requests.get(f"{base}/assets", headers=headers, params={"limit": 25}, timeout=30).json()
assets = next(group["assets"] for group in response["data"] if group["group_id"] == "<project-id>")
print(assets)
```

{% endtab %}

{% tab title="Go" %}

```go
req, _ := http.NewRequest(http.MethodGet, base+"/assets?limit=25", nil)
req.Header.Set("Authorization", "Bearer "+key)
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.m-xr.com/marso-studio-api/getting-started/library.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
