Barrack API Documentation
  1. Volumes
Barrack API Documentation
  • Platform Documentation
    • Getting Started
    • Authentication & Access
    • Account Management
    • API Keys
    • GPU Models
    • Regions
    • Instance
      • OS Images
      • Bootsource Management
      • Deploy Instance
      • Instance Management
      • Hibernation
      • View Instances
    • SSH Keys
      • Add SSH Keys
      • Manage SSH Keys
    • Volumes
      • Overview
      • Create Volume
      • List and View Volumes
      • Attach Volumes
      • Detach Volumes
      • Clone Volumes
      • Resize Volume
      • Delete Volume
    • Advanced Configurations
      • Network And Security
      • Cloudinit Script
      • Startup Script
    • Firewall
      • Manage Firewall
      • Rules and Attachment
    • Snapshot
      • Overview
      • Manage Snapshots
      • Restore Snapshots
    • Custom Images
      • Overview
      • Create and Manage Images
    • dashboard
      • "Dashboard Overview"
      • "VM Management"
    • AI Chat
      • AI Chat
  • Balance
    • Get credit balance
      GET
  • GPU Stocks
    • Get GPU stock availability
      GET
  • GPU Specs
    • Get GPU specifications
  • Regions
    • List available regions
  • Pricing
    • Get pricing information
    • Get pricing information
  • Deploy Instance
    • Create a new instance
  • Instance management
    • List instances
    • Get instance details
    • Get instance billing
    • Start instance
    • Stop instance
    • Reboot instance
    • Hibernate instance
    • Restore hibernated instance
    • Toggle public IP for instance
    • Add instance security rule
    • Remove instance security rule
    • Delete instance
  • OS Images
    • List OS images
  • SSH Keys
    • List SSH keys
    • Get SSH key
    • Create SSH key
    • Delete SSH key
  • Volumes
    • List volumes
      GET
    • Create volume
      POST
    • Get volume details
      GET
    • Delete volume
      DELETE
    • Resize volume
      POST
    • Clone volume
      POST
    • Attach volumes to instance
      POST
    • Detach volumes from instance
      POST
    • List available volume types
      GET
    • Get volume billing
      GET
  • Firewalls
    • List firewalls
    • Get firewall details
    • Get supported protocols
    • Get firewalls attached to instance
    • List instances available for firewall attachment
    • Create firewall
    • Delete firewall
    • Add firewall rule
    • Remove firewall rule
    • Attach firewall to instances
  • Scripts
    • List all startup scripts
    • Get startup script details
    • Create a startup script
    • Update a startup script
    • Delete a startup script
    • Delete multiple startup scripts
  • Snapshots
    • List snapshots
    • Get snapshot details
    • List Instance eligible for snapshot creation
    • Get snapshot billing
    • Create snapshot
    • Delete snapshot
    • Restore snapshot
  • Images
    • List custom images
    • Get image details
    • Create image from snapshot
    • Delete custom image
    • Get snapshot-image relationship
    • Get snapshot-image relationship list
  • AI Chat
    • Get available AI models
    • Chat with AI
    • Get AI usage summary
    • Get AI usage history
  • Schemas
    • AITransaction
    • AddFirewallRuleRequest
    • AddFirewallRuleResponse
    • AddVMSecurityRuleResponse
    • AttachFirewallRequest
    • AggregatedBillingResponse
    • AttachFirewallResponse
    • AttachVolumesRequest
    • AttachVolumesResponse
    • AttachedFirewall
    • BatchSnapshotImageRelationshipResponse
    • Balance
    • Billing
    • ChatCompletionsRequest
    • ChatCompletionsResponse
    • CloneVolumeRequest
    • BillingRecord
    • CloneVolumeResponse
    • BillingSummary
    • CreateFirewallRequest
    • CreateFirewallResponse
    • CreateImageFromSnapshotRequest
    • CreateSSHKeyRequest
    • CreateScriptRequest
    • CreateSnapshotRequest
    • CreateSnapshotResponse
    • CreateSSHKeyResponse
    • CurrencyEnum
    • Data
    • CreditBalanceResponse
    • DeleteFirewallResponse
    • CreateVolumeRequest
    • DeleteSnapshotResponse
    • CreateVolumeResponse
    • DeleteVMResponse
    • DetachVolumesRequest
    • DetachVolumesResponse
    • DeploymentRequest
    • DirectionEnum
    • DeploymentResponse
    • EthertypeEnum
    • ErrorResponse
    • FirewallAttachment
    • DeleteVolumeResponse
    • DeleteSSHKeyResponse
    • FirewallEnvironment
    • FirewallResponse
    • FirewallRule
    • FirewallVM
    • GetBatchSnapshotImageRelationshipsRequest
    • GetFirewallDetailsResponse
    • GPUStockConfiguration
    • GPUSpec
    • GetHibernatedVMsResponse
    • GPUStockItem
    • GPUSpecsResponse
    • GetSupportedProtocolsResponse
    • GPUStocksResponse
    • GetVMAttachedFirewallsResponse
    • GetVolumeTypesResponse
    • HibernateVMResponse
    • HibernationBillingMetrics
    • ListFirewallsResponse
    • ListUserVMsResponse
    • ListVMsResponse
    • ModelsResponse
    • GetSSHKeysResponse
    • Pagination
    • PricingRequest
    • OSImage
    • PricingResponse
    • OSImagesResponse
    • Protocol
    • GpuCountEnum
    • ProtocolEnum
    • Image
    • GpuModelEnum
    • GetVolumeDetailsResponse
    • RebootVMResponse
    • ImageCreateResponse
    • RecentHibernation
    • ImageDeleteResponse
    • GetVolumesWithNextNameResponse
    • RemoveFirewallRuleResponse
    • ImageDetailResponse
    • RemoveVMSecurityRuleResponse
    • Region
    • ImageListResponse
    • ResizeVolumeRequest
    • RegionsResponse
    • Price
    • ResizeVolumeResponse
    • ResourceTypeEnum
    • RestoreSnapshotRequest
    • RestoreSnapshotResponse
    • RestoreVMResponse
    • Snapshot
    • SnapshotImageRelationshipResponse
    • Specs
    • StartVMResponse
    • StopVMResponse
    • TierEnum
    • UpdateScriptRequest
    • UsageHistoryResponse
    • UsageSummaryResponse
    • RegionEnum
    • UserVM
    • VMDetailsResponse
    • VMFlavor
    • VMImage
    • VMInstance
    • VMResponse
    • SpecsMetadata
    • VMSecurityRule
    • VMSecurityRuleRequest
    • VMStatus
    • VMVolumeAttachment
    • Script
    • VolumeTypeEnum
    • SSHKeyResponse
    • ScriptListResponse
    • ToggleVMPublicIPResponse
    • VolumeBillingRecord
    • VolumeBillingSummary
    • VolumeHourlyBillingResponse
    • VolumeResponse
  1. Volumes

Detach volumes from instance

POST
/instances/{vm_id}/detach-volumes/
Detach one or more storage volumes from a virtual machine. The VM must be stopped before detaching volumes. OS volumes cannot be detached. All volumes must be currently attached to the specified VM and in the same tier and region. Supports detaching up to 10 volumes in a single request.

Request

Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Volumes detached successfully
Body

🟠400
🟠401
🟠404
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://barrack.ai/api/instances//detach-volumes/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "volume_ids": [
        "string"
    ]
}'
Response Response Example
200 - Success
{
    "success": true,
    "message": "Volumes detached successfully",
    "volume_ids": [
        "BRK-123456V"
    ],
    "vm_id": "BRK-123456D",
    "tier": "legacy",
    "region": "CANADA-1",
    "status": "completed"
}
Previous
Attach volumes to instance
Next
List available volume types
Built with