API guide for Database Restores

Prev Next

Lucidity AutoScaler - API Guide

Manage and optimize your cloud instances with temporary buffer operations

Overview

What is the Lucidity API?

Lucidity's API enables you to programmatically manage temporary storage buffers on your cloud instances across AWS, Azure, and GCP. This allows you to safely perform operations that require additional storage space (like database restores or data migrations) without permanently altering your scaling policies.

Common Use Cases

  • Database Restores: Add temporary storage for large backup files

  • Data Migrations: Extra space for data transformation operations

Business Value

  • Cost Optimization: Pay only for temporary storage when needed

  • Automation: Integrate with existing workflows and tools

  • Safety: Automatic reversion to original scaling policies

  • Multi-Cloud: Consistent API across AWS, Azure, and GCP

Overview: This diagram shows the end-to-end process of using Lucidity APIs, from initial setup through cleanup.

Flowchart diagram titled Start: Need Temporary Storage showing the end-to-end Lucidity API process. Nodes (in reading order) include: Start: Need Temporary Storage; Setup: Get Refresh Token from Lucidity Customer Success Team; Get Access Token POST /auth/user-token/refresh; Request Buffer PATCH /instance/buffer/request; Monitor Status GET /buffer/bufferId/status; decision diamond Status? with branches labeled PROVISIONING (leading to Wait 30s and back to Monitor Status), ACTIVE (leading to Perform Your Operations — Database restore, migration, etc., then Revoke Buffer POST /buffer/bufferId/revoke, then Complete: Instance restored), and FAILED (leading to Handle Error — Check failureReason, then decision diamond Retry? with branch Yes looping back to Request Buffer and branch No leading to Workflow ended). The diagram also shows small labels Yes and No on the retry paths and API endpoints for relevant steps.

Multi-Cloud Support

The Lucidity API provides a unified interface across AWS, Azure, and GCP, with provider-specific parameter handling.

Buffer Lifecycle

PROVISIONING

Infrastructure being created

Wait and monitor

ACTIVE

Ready for your operations

Start using buffer

REVOKED

Buffer removed successfully

Cleanup complete

FAILED

Provisioning encountered error

Check failureReason

1. Request Temporary Buffer

Purpose: Allocate additional storage space on a cloud instance

ENDPOINT

PATCH external/api/v1/autoscaler/instance/buffer/request

Best Practices

Security

  • Never log or commit API tokens to version control

  • Use secure credential storage (vaults, secret managers)

  • Rotate refresh tokens regularly (before expiry)

  • Monitor token usage for unauthorized access

  • Use HTTPS only for all API communications

Performance & Reliability

  • Use request IDs to prevent duplicate operations

  • Respect rate limits: Maximum 50 requests per minute

  • Set appropriate timeouts (5-10 seconds for API calls)

Cost Optimization

  • Always revoke buffers when operations complete

  • Use automation to prevent human error in cleanup

Operational Excellence

  • Use descriptive request IDs for easier tracking

  • Log all API operations for audit trails

  • Test in non-production environments first

FAQ

General Questions

Q: How much do temporary buffers cost?

A: You pay standard cloud storage rates only for the duration the buffer is active.

Costs vary by cloud provider and region.

Q: Can I have multiple buffers on the same instance?

A: No, only one buffer can be active per instance at a time.

Q: What happens if I forget to revoke a buffer?

A: Lucidity will send reminders, but the buffer will continue incurring costs until manually revoked.

Q: Is there a size limit for buffers?

A: Buffer sizes typically range from 1GB to 1TB, but limits may vary by cloud provider and instance type.

Technical Questions

Q: How long do access tokens last?

A: Access tokens expire after 15 minutes for security.

Q: Can I extend the buffer duration?

A: Buffers don't have a maximum duration, but you pay for storage while active.

Always revoke when done.

To learn more about the API, click here