Attach a volume to a running machine
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/volumes"
payload = {
"ref": "<string>",
"mount_path": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/volumes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ref": "<string>",
"mount_path": "<string>"
}
'{
"id": "<string>",
"volume_id": "<string>",
"machine_id": "<string>",
"mount_path": "<string>",
"read_only": true,
"state": "requested",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"subpath": "<string>",
"last_error_code": "<string>",
"last_error_message": "<string>"
}
Volumes
Attach a volume to a running machine
POST
/
v1
/
machines
/
{id}
/
volumes
Attach a volume to a running machine
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/volumes"
payload = {
"ref": "<string>",
"mount_path": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/volumes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ref": "<string>",
"mount_path": "<string>"
}
'{
"id": "<string>",
"volume_id": "<string>",
"machine_id": "<string>",
"mount_path": "<string>",
"read_only": true,
"state": "requested",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"subpath": "<string>",
"last_error_code": "<string>",
"last_error_message": "<string>"
}
Body
application/json
Shared-volume mount request. ref accepts either an exact volume name or a volume id and is resolved server-side.
Response
Volume attached