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
  • Deploy Instance
    • Create a new instance
      POST
  • Pricing
    • Get pricing information
    • Get pricing information
  • Instances
    • List instances
    • Delete instance
    • Hibernate instance
    • Reboot instance
    • Restore hibernated instance
    • Start instance
    • Stop instance
    • Toggle public IP for instance
    • Get instance details
    • Get firewalls attached to instance
    • Add instance security rule
    • Remove instance security rule
    • Get instance billing
    • List Instance eligible for snapshot creation
  • SSH Keys
    • List SSH keys
    • Create SSH key
    • Get SSH key
    • Delete SSH key
  • Volumes
    • Attach volumes to instance
      POST
    • Detach volumes from instance
      POST
    • List volumes
      GET
    • Create volume
      POST
    • Get volume details
      GET
    • Delete volume
      DELETE
    • Clone volume
      POST
    • Resize volume
      POST
    • Get volume billing
      GET
    • List available volume types
      GET
  • Scripts
    • List all startup scripts
    • Create a startup script
    • Get startup script details
    • Update a startup script
    • Delete a startup script
    • Delete multiple startup scripts
  • Snapshots
    • Create snapshot
    • List snapshots
    • Get snapshot details
    • Delete snapshot
    • Restore snapshot
    • Get snapshot billing
  • Images
    • List custom images
    • Get image details
    • Delete custom image
    • List OS images
    • Create image from snapshot
    • Get snapshot-image relationship
    • Get snapshot-image relationship list
  • Firewalls
    • List firewalls
    • Get firewall details
    • Attach firewall to instances
    • Delete firewall
    • Remove firewall rule
    • Add firewall rule
    • Create firewall
    • List instances available for firewall attachment
    • Get supported protocols
  • GPU Stocks
    • Get GPU stock availability
  • GPU Specs
    • Get GPU specifications
  • Regions
    • List available regions
  • AI Chat
    • Chat with AI
    • Get available AI models
  • AI Usage
    • Get AI usage history
    • Get AI usage summary
  • Schemas
    • AITransaction
    • AddFirewallRuleRequest
    • APIKeyResponse
    • AddFirewallRuleResponse
    • AddVMSecurityRuleResponse
    • AttachFirewallRequest
    • AggregatedBillingResponse
    • AttachFirewallResponse
    • AttachVolumesRequest
    • AttachVolumesResponse
    • AttachedFirewall
    • BatchSnapshotImageRelationshipResponse
    • Balance
    • Billing
    • ChatCompletionsRequest
    • ChatCompletionsResponse
    • CloneVolumeRequest
    • BillingRecord
    • BillingBreakdown
    • CloneVolumeResponse
    • BillingSummary
    • CreateFirewallRequest
    • CreateFirewallResponse
    • BootSourceEnum
    • CreateImageFromSnapshotRequest
    • BulkDeleteResponse
    • CreateSSHKeyRequest
    • CreateScriptRequest
    • CreateSnapshotRequest
    • CreateSnapshotResponse
    • CreateSSHKeyResponse
    • ComputeBilling
    • CurrencyEnum
    • Data
    • CreditBalanceResponse
    • CreateAPIKeyRequest
    • DeleteFirewallResponse
    • CreateVolumeRequest
    • CreateAPIKeyRequestTierEnum
    • DeleteSnapshotResponse
    • CreateVolumeResponse
    • CreateAPIKeyResponse
    • DeleteVMResponse
    • DetachVolumesRequest
    • DetachVolumesResponse
    • DeploymentRequest
    • DirectionEnum
    • DeploymentResponse
    • CreateSnapshotData
    • EthertypeEnum
    • ErrorResponse
    • FirewallAttachment
    • DeleteVolumeResponse
    • DeleteSSHKeyResponse
    • FirewallEnvironment
    • FirewallResponse
    • FirewallRule
    • FirewallVM
    • DataVolumeBilling
    • GetBatchSnapshotImageRelationshipsRequest
    • GetFirewallDetailsResponse
    • GPUStockConfiguration
    • GPUSpec
    • GetHibernatedVMsResponse
    • GPUStockItem
    • GPUSpecsResponse
    • GetSupportedProtocolsResponse
    • GPUStocksResponse
    • GetVMAttachedFirewallsResponse
    • DeploymentData
    • DeleteAPIKeyResponse
    • GetVolumeTypesResponse
    • HibernateVMResponse
    • HibernationBillingMetrics
    • ListFirewallsResponse
    • ListUserVMsResponse
    • ListVMsResponse
    • DeploymentDataStatusEnum
    • ModelsResponse
    • GetSSHKeysResponse
    • Pagination
    • PricingRequest
    • OSImage
    • Deposit
    • PricingResponse
    • OSImagesResponse
    • DepositStatusEnum
    • Protocol
    • GpuCountEnum
    • FirewallInstance
    • ProtocolEnum
    • Image
    • GpuModelEnum
    • GetVolumeDetailsResponse
    • RebootVMResponse
    • ImageCreateResponse
    • RecentHibernation
    • ImageDeleteResponse
    • GetVolumesWithNextNameResponse
    • RemoveFirewallRuleResponse
    • ImageDetailResponse
    • RemoveVMSecurityRuleResponse
    • Region
    • ImageListResponse
    • ResizeVolumeRequest
    • RegionsResponse
    • Price
    • ResizeVolumeResponse
    • ResourceTypeEnum
    • RestoreSnapshotRequest
    • RestoreSnapshotResponse
    • GetSSHKeyDetailResponse
    • RestoreVMResponse
    • Snapshot
    • SnapshotImageRelationshipResponse
    • GetSnapshotDetailsResponse
    • Specs
    • StartVMResponse
    • GpuBilling
    • StopVMResponse
    • TierEnum
    • UpdateScriptRequest
    • UsageHistoryResponse
    • UsageSummaryResponse
    • RegionEnum
    • UserVM
    • VMDetailsResponse
    • VMFlavor
    • InstanceFeatures
    • VMImage
    • InstanceSpecs
    • VMInstance
    • IpStatusEnum
    • VMResponse
    • SpecsMetadata
    • VMSecurityRule
    • VMSecurityRuleRequest
    • VMStatus
    • VMVolumeAttachment
    • Script
    • ListFirewallInstancesResponse
    • VolumeTypeEnum
    • SSHKeyResponse
    • ScriptListResponse
    • OsVolume
    • ListSnapshotsResponse
    • ListVMsForSnapshotResponse
    • ListAPIKeysResponse
    • PricingRequestVolumeTypeEnum
    • ToggleVMPublicIPResponse
    • PatchedDeposit
    • PatchedTransaction
    • PaymentMethodEnum
    • VolumeBillingRecord
    • VolumeBillingSummary
    • VolumeHourlyBillingResponse
    • SecurityRule
    • ScriptCreateResponse
    • RestoreSnapshotData
    • ScriptDeleteResponse
    • ScriptDetailResponse
    • VolumeResponse
    • ScriptUpdateResponse
    • StatusEnum
    • StorageBilling
    • SnapshotBillingRecord
    • SnapshotBillingResponse
    • SnapshotBillingSummary
    • SnapshotDetail
    • SnapshotListItem
    • SnapshotVMResponse
    • Tier528Enum
    • TokenObtainPair
    • TokenRefresh
    • Transaction
    • VolumeCreate
    • TransactionTypeEnum
    • VolumeCreateVolumeTypeEnum
    • VolumeRate
    • UserProfile
    • VMDetailVolumeAttachment
    • VMOperations
    • VMSpecs
    • VolumeTypeItem
    • VolumeTypesByTier
  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

Authorization
API Key
Add parameter in header
X-API-Key
Example:
X-API-Key: ********************
or
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Volumes detached successfully
Body

🟠400
🟠401
🟠404
🟠409
🔴500
🔴502
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://barrack.ai/api/instances//detach-volumes/' \
--header 'X-API-Key: <api-key>' \
--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 volumes
Built with