# Snapshot Mount

## Mount Snapshot

<mark style="color:green;">`POST`</mark> `https://$(tvm_address):8780/v1/$(tenant_id)/snapshots/<snapshot_id>/mount`

Mounts a Snapshot to the provided File Recovery Manager

#### Path Parameters

| Name         | Type   | Description                                         |
| ------------ | ------ | --------------------------------------------------- |
| tvm\_address | string | IP or FQDN of Trilio service                        |
| tenant\_id   | string | ID of the Tenant/Project the Snapshot is located in |
| snapshot\_id | string | ID of the Snapshot to mount                         |

#### Headers

| Name              | Type   | Description                     |
| ----------------- | ------ | ------------------------------- |
| X-Auth-Project-Id | string | Project to authenticate against |
| X-Auth-Token      | string | Authentication token to use     |
| Content-Type      | string | application/json                |
| Accept            | string | application/json                |
| User-Agent        | string | python-workloadmgrclient        |

{% tabs %}
{% tab title="200 Snapshot mount request has been received and will be processed." %}

```
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Wed, 11 Nov 2020 15:29:03 GMT
Content-Type: application/json
Content-Length: 0
Connection: keep-alive
X-Compute-Request-Id: req-9d779802-9c65-463a-973c-39cdffcba82e
```

{% endtab %}
{% endtabs %}

### Body Format

```
{
   "mount":{
      "mount_vm_id":"15185195-cd8d-4f6f-95ca-25983a34ed92",
      "options":{
         
      }
   }
}
```

## List of mounted Snapshots in Tenant

<mark style="color:blue;">`GET`</mark> `https://$(tvm_address):8780/v1/$(tenant_id)/snapshots/mounted/list`

Provides the list of all Snapshots mounted in a Tenant

#### Path Parameters

| Name         | Type   | Description                                      |
| ------------ | ------ | ------------------------------------------------ |
| tvm\_address | string | IP or FQDN of Trilio service                     |
| tenant\_id   | string | ID of the Tenant to search for mounted Snapshots |

#### Headers

| Name              | Type   | Description                     |
| ----------------- | ------ | ------------------------------- |
| X-Auth-Project-Id | string | Project to authenticate against |
| X-Auth-Token      | string | Authentication token to use     |
| Accept            | string | application/json                |
| User-Agent        | string | python-workloadmgr              |

{% tabs %}
{% tab title="200 Request has been received and list of Snapshots is given out" %}

```
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Wed, 11 Nov 2020 15:44:42 GMT
Content-Type: application/json
Content-Length: 228
Connection: keep-alive
X-Compute-Request-Id: req-04c6ef90-125c-4a36-9603-af1af001006a

{
   "mounted_snapshots":[
      {
         "snapshot_id":"ed4f29e8-7544-4e1c-af8a-a76031211926",
         "snapshot_name":"snapshot",
         "workload_id":"4bafaa03-f69a-45d5-a6fc-ae0119c77974",
         "mounturl":"[\"http://192.168.100.87\"]",
         "status":"mounted"
      }
   ]
}
```

{% endtab %}
{% endtabs %}

## List of mounted Snapshots in Workload

<mark style="color:blue;">`GET`</mark> `https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>/snapshots/mounted/list`

Provides the list of all Snapshots mounted in a specified Workload

#### Path Parameters

| Name         | Type   | Description                                        |
| ------------ | ------ | -------------------------------------------------- |
| tvm\_address | string | IP or FQDN of Trilio service                       |
| tenant\_id   | string | ID of the Tenant to search for mounted Snapshots   |
| workload\_id | string | ID of the Workload to search for mounted Snapshots |

#### Headers

| Name              | Type   | Description                     |
| ----------------- | ------ | ------------------------------- |
| X-Auth-Project-Id | string | Project to authenticate against |
| X-Auth-Token      | string | Authentication token to use     |
| Accept            | string | application/json                |
| User-Agent        | string | python-workloadmgr              |

{% tabs %}
{% tab title="200 Request has been received and list of Snapshots is given out" %}

```
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Wed, 11 Nov 2020 15:44:42 GMT
Content-Type: application/json
Content-Length: 228
Connection: keep-alive
X-Compute-Request-Id: req-04c6ef90-125c-4a36-9603-af1af001006a

{
   "mounted_snapshots":[
      {
         "snapshot_id":"ed4f29e8-7544-4e1c-af8a-a76031211926",
         "snapshot_name":"snapshot",
         "workload_id":"4bafaa03-f69a-45d5-a6fc-ae0119c77974",
         "mounturl":"[\"http://192.168.100.87\"]",
         "status":"mounted"
      }
   ]
}
```

{% endtab %}
{% endtabs %}

## Dismount Snapshot

<mark style="color:green;">`POST`</mark> `https://$(tvm_address):8780/v1/$(tenant_id)/snapshots/<snapshot_id>/dismount`

Unmounts a Snapshot of the provided File Recovery Manager

#### Path Parameters

| Name         | Type   | Description                                         |
| ------------ | ------ | --------------------------------------------------- |
| tvm\_address | string | IP or FQDN of Trilio service                        |
| tenant\_id   | string | ID of the Tenant/Project the Snapshot is located in |
| snapshot\_id | string | ID of the Snapshot to dismount                      |

#### Headers

| Name              | Type   | Description                     |
| ----------------- | ------ | ------------------------------- |
| X-Auth-Project-Id | string | Project to authenticate against |
| X-Auth-Token      | string | Authentication token to use     |
| Content-Type      | string | application/json                |
| Accept            | string | application/json                |
| User-Agent        | string | python-workloadmgrclient        |

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

```
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Wed, 11 Nov 2020 16:03:49 GMT
Content-Type: application/json
Content-Length: 0
Connection: keep-alive
X-Compute-Request-Id: req-abf69be3-474d-4cf3-ab41-caa56bb611e4
```

{% endtab %}
{% endtabs %}

### Body Format

```
{
   "mount": 
      {
          "options": null
      }
}
```


---

# 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.trilio.io/openstack/t4o-5.x/api-guide/snapshot-mount.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.
