Object Commands

Upload, download, and manage objects in OSS buckets.

RAPS object operations demo

Commands Overview

CommandDescription
raps object uploadUpload a file to a bucket
raps object upload-batchUpload multiple files in parallel
raps object downloadDownload an object from a bucket
raps object listList objects in a bucket
raps object deleteDelete an object
raps object signed-urlGenerate signed download URL
raps object infoGet detailed object metadata
raps object copyCopy an object within/between buckets
raps object renameRename an object

raps object upload

Upload files to an OSS bucket with progress tracking.

raps object upload <bucket-key> <file-path> [options]

Options:

  • --key, -k: Custom object key (defaults to filename)
  • --batch: Upload multiple files
  • --parallel: Enable parallel uploads
  • --concurrency: Number of concurrent uploads (default: 5)
  • --resume: Resume an interrupted upload

Single file upload:

$ raps object upload my-bucket model.rvt
Uploading model.rvt...
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100% (45.2 MB)
βœ“ Upload complete!
  Object Key: model.rvt
  URN: dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXktYnVja2V0L21vZGVsLnJ2dA

Batch upload with wildcards:

$ raps object upload my-bucket ./models/*.dwg --batch --parallel
Uploading 5 files with 5 concurrent uploads...
  [1/5] floor-plan.dwg β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
  [2/5] elevation.dwg β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
  [3/5] section-a.dwg β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
  [4/5] section-b.dwg β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
  [5/5] details.dwg β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
βœ“ All files uploaded successfully!

Resume interrupted upload:

raps object upload my-bucket large-model.rvt --resume

Custom object key:

raps object upload my-bucket model.rvt --key "projects/2024/building-a.rvt"

### Upload Performance (v3.7.0+)

RAPS v3.7.0 introduces major performance improvements for file uploads:

- **πŸš€ Parallel Multipart Uploads**: 3-10x faster for large files (>5MB)
- **πŸ’Ύ Streaming Uploads**: Reduced memory usage, no file size limits
- **πŸ”„ Automatic Retry**: Consistent retry logic across all upload operations
- **πŸ“Š Smart Concurrency**: Optimized parallel processing with bounded concurrency

**Performance comparison for 500MB file:**
- **v3.6.x**: ~15 minutes (serial uploads)
- **v3.7.0+**: ~2-3 minutes (parallel uploads)

**Large file best practices:**
```bash
# Large file uploads automatically use parallel multipart
raps object upload my-bucket large-model.rvt
# βœ“ Automatically splits into 5MB chunks
# βœ“ Uploads 5 chunks concurrently  
# βœ“ Handles retry on chunk failure
# βœ“ Resumes on network interruption

raps object download

Download objects from a bucket.

raps object download <bucket-key> <object-key> [--output PATH]
$ raps object download my-bucket model.rvt --output ./downloads/
Downloading model.rvt...
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100% (45.2 MB)
βœ“ Downloaded to: ./downloads/model.rvt

raps object list

List all objects in a bucket.

$ raps object list my-bucket
Objects in 'my-bucket':
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Key                        β”‚ Size         β”‚ Last Modified        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ model.rvt                  β”‚ 45.2 MB      β”‚ 2024-01-15 10:30:00  β”‚
β”‚ floor-plan.dwg             β”‚ 2.1 MB       β”‚ 2024-01-15 10:32:00  β”‚
β”‚ elevation.dwg              β”‚ 1.8 MB       β”‚ 2024-01-15 10:33:00  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

With prefix filter:

raps object list my-bucket --prefix "projects/2024/"

raps object signed-url

Generate a pre-signed S3 URL for direct download.

raps object signed-url <bucket-key> <object-key> [--minutes MINUTES]
$ raps object signed-url my-bucket model.rvt --minutes 60
Signed URL (expires in 60 minutes):
https://developer.api.autodesk.com/oss/v2/signedresources/...

Use cases:

  • Share temporary download links
  • Integrate with external systems
  • Enable direct client downloads

raps object urn

Get the Base64-encoded URN for an object (required for translation).

$ raps object urn my-bucket model.rvt
URN: dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXktYnVja2V0L21vZGVsLnJ2dA

Save to variable:

URN=$(raps object urn my-bucket model.rvt --output plain)
raps translate start "$URN" --format svf2

raps object delete

Delete an object from a bucket.

$ raps object delete my-bucket model.rvt
⚠ Warning: This will permanently delete 'model.rvt'
  Are you sure? (y/N): y
βœ“ Object deleted successfully

raps object info

Get detailed metadata about an object.

raps object info <BUCKET_KEY> <OBJECT_KEY>

Example:

$ raps object info my-bucket model.rvt
Object Details:
  Bucket:    my-bucket
  Key:       model.rvt
  Size:      45.2 MB
  SHA1:      abc123def456...
  URN:       dXJuOmFkc2sub2...
  Created:   2024-01-15 10:30:00

raps object copy

Copy an object to another bucket or key.

raps object copy --source-bucket <BUCKET> --source-object <KEY> --dest-bucket <BUCKET> [--dest-object <KEY>]

Options:

  • --source-bucket - Source bucket key
  • --source-object - Source object key
  • --dest-bucket - Destination bucket key
  • --dest-object - Destination object key (defaults to source key)

Example:

$ raps object copy --source-bucket dev-bucket --source-object model.rvt \
    --dest-bucket prod-bucket --dest-object v2/model.rvt

raps object rename

Rename an object within a bucket.

raps object rename <BUCKET_KEY> <OBJECT_KEY> --new-key <NEW_KEY>

Options:

  • --new-key - New object key

Example:

$ raps object rename my-bucket old-name.rvt --new-key new-name.rvt

Large File Uploads

For files over 100 MB, RAPS automatically uses resumable multipart uploads:

$ raps object upload my-bucket large-model.ifc
Uploading large-model.ifc (2.1 GB)...
Using resumable upload (21 parts)...
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
βœ“ Upload complete!

Benefits:

  • Resume interrupted uploads
  • Better performance for large files
  • Automatic retry on failures

CI/CD Examples

Upload and get URN

raps object upload my-bucket model.rvt
URN=$(raps object urn my-bucket model.rvt --output plain)
echo "Uploaded with URN: $URN"

Batch upload entire directory

find ./models -name "*.dwg" | xargs -I {} raps object upload my-bucket {}

Next Steps