Skip to main content
Version: 2.10

REST API

Portworx Backup APIs allow you to interact with the application seamlessly to perform operations.

Optional UUID for backup resources

The UUID (Universally Unique Identifier) parameter is optional across all PXB API, providing flexibility in how users interact with backup resources.

When using REST API endpoints, you can reference resources by name instead of UUID:

PXB REST API

Create backup using resource name

curl -X POST "https://px-backup-api/v1/backup" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"name": "my-app-backup",
"cluster_name": "prod-cluster",
"namespace": "default"
}'

Get backup status by name

curl -X GET "https://px-backup-api/v1/backup/my-app-backup" \
-H "Authorization: Bearer $TOKEN"

PXB gRPC API

gRPC calls also support name-based resource identification:

# Create backup request using name
req := &api.BackupCreateRequest{
Name: "my-app-backup",
ClusterName: "prod-cluster",
Namespaces: []string{"default"},
}
# Get backup by name
getReq := &api.BackupInspectRequest{
Name: "my-app-backup",
}

Commonly used REST API-based request and responses are available here: