API Reference
Integrate MigrateClouds into your applications using our RESTful API.
Overview
The MigrateClouds API allows you to programmatically manage cloud migrations, access files across connected cloud services, and automate workflows. Our API follows RESTful principles and uses JSON for request and response bodies.
API Access
Base URL
All API requests should be made to the following base URL:
Authentication
The MigrateClouds API uses API keys for authentication. You can generate an API key in your account settings.
Generating an API Key
- Log in to your MigrateClouds account
- Go to Settings > API Keys
- Click "Generate New API Key"
- Give your key a descriptive name
- Click "Create API Key"
Security Warning
Using Your API Key
Include your API key in the Authorization header of all requests:
Rate Limiting
The MigrateClouds API implements rate limiting to ensure fair usage. Rate limits vary by plan:
- Pro Plan: 60 requests per minute
- Enterprise Plan: 300 requests per minute
If you exceed your rate limit, the API will return a 429 Too Many Requests response. The response will include a Retry-After header indicating how long to wait before making another request.
API Endpoints
The MigrateClouds API is organized around the following resource groups:
For a complete list of endpoints and their parameters, see the Endpoints documentation.
Example Request
Here's an example of how to list files in a connected Google Drive:
curl -X GET \ https://api.migrateclouds.com/v1/files/list \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "service": "google_drive", "path": "/Documents", "recursive": false }'
Example response:
{ "status": "success", "data": { "files": [ { "id": "1Abc123XyZ", "name": "Project Proposal.docx", "type": "file", "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "size": 25600, "created_at": "2023-06-15T10:30:00Z", "modified_at": "2023-06-16T14:45:00Z" }, { "id": "2Def456UvW", "name": "Marketing", "type": "folder", "mime_type": "application/vnd.google-apps.folder", "size": 0, "created_at": "2023-05-20T09:15:00Z", "modified_at": "2023-06-10T11:20:00Z" } ], "next_page_token": null } }
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of a request. In case of an error, the response body will include an error message and additional details when available.
{ "status": "error", "error": { "code": "invalid_parameter", "message": "The 'path' parameter is invalid", "details": "Path must start with a forward slash" } }
Common error codes include:
authentication_error
: Invalid or missing API keypermission_denied
: Insufficient permissions for the requested operationinvalid_parameter
: One or more request parameters are invalidresource_not_found
: The requested resource does not existrate_limit_exceeded
: You've exceeded your API rate limitservice_error
: Error from the underlying cloud service
SDKs and Libraries
We provide official client libraries for several programming languages to make it easier to integrate with the MigrateClouds API:
Next Steps
To learn more about the MigrateClouds API, explore these resources:
- Authentication - Detailed information about API authentication
- Endpoints - Complete reference for all API endpoints
- Webhooks - Learn how to receive real-time notifications
- Code Examples - Sample code for common use cases