MigrateClouds
Docs
Docs
Reference

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.

Base URL

All API requests should be made to the following base URL:

https://api.migrateclouds.com/v1

Authentication

The MigrateClouds API uses API keys for authentication. You can generate an API key in your account settings.

Generating an API Key

  1. Log in to your MigrateClouds account
  2. Go to Settings > API Keys
  3. Click "Generate New API Key"
  4. Give your key a descriptive name
  5. Click "Create API Key"

Using Your API Key

Include your API key in the Authorization header of all requests:

Authorization: Bearer YOUR_API_KEY

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:

Cloud Services

Manage connected cloud services and authentication.

View Endpoints

Files

List, upload, download, and manage files across cloud services.

View Endpoints

Transfers

Create and manage file transfers between cloud services.

View Endpoints

Webhooks

Configure webhooks for real-time notifications.

View Endpoints

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 key
  • permission_denied: Insufficient permissions for the requested operation
  • invalid_parameter: One or more request parameters are invalid
  • resource_not_found: The requested resource does not exist
  • rate_limit_exceeded: You've exceeded your API rate limit
  • service_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: