> For the complete documentation index, see [llms.txt](https://multiset.gitbook.io/multiset/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://multiset.gitbook.io/multiset/fundamentals/rest-api-docs/map-operations.md).

# Map Operations

{% openapi src="/files/UV64lJchhd7SUxNgji6q" path="/file" method="get" %}
[filelink.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2FCTMTzA039Zqe3I3p1THH%2Ffilelink.yaml?alt=media\&token=213cb0b1-3e53-4e31-a643-870c715cf75b)
{% endopenapi %}

### Replace a map's mesh

Use `/vps/map/{mapCode}/mesh-upload-url` to replace a map's **textured** or **raw** mesh. The flow is:

1. `POST /vps/map/{mapCode}/mesh-upload-url` with the `meshType` you want to replace (`textured` or `raw`).
2. `PUT` the mesh file to the returned `uploadUrl`, using the `contentType` from the response as your `Content-Type` header. The URL is valid for 1 hour.

{% hint style="info" %}
You never construct a storage path. The upload location is derived from the map in the path, so the request can only replace that map's own mesh. The map must be **active**, and your role must allow write access (owner or admin).
{% endhint %}

{% openapi src="/files/cYpvLjgZRyUzuDKNwnnr" path="/vps/map/{mapCode}/mesh-upload-url" method="post" %}
[mesh-upload-url.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-5fcd439c933a2c5405a5e94d73dad63634020031%2Fmesh-upload-url.yaml?alt=media)
{% endopenapi %}

{% hint style="success" %}
Replacing a mesh does not affect localization accuracy. Queries run on the map's feature data, not on the mesh, so you can update the visual mesh at any time without re-processing the map.
{% endhint %}

{% openapi src="/files/7h9I87pKfSRJ4vlJK1Kg" path="/vps/map/{mapCode}" method="delete" %}
[map-delete.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-99caa797ce8ad5d21789558c59d17d55623fc78b%2Fmap-delete.yaml?alt=media)
{% endopenapi %}


---

# 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 dynamically by asking a question.

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

```
GET https://multiset.gitbook.io/multiset/fundamentals/rest-api-docs/map-operations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
