> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Arvo-AI/aurora/llms.txt
> Use this file to discover all available pages before exploring further.

# List Connectors

> Get available cloud provider connectors and connection status

# List Connectors

Retrieve information about available cloud provider connectors and their connection status for the authenticated user.

## GET /api/user\_connections

Fetch all active connections for the authenticated user.

**Authentication:** Required (X-User-ID header)

**Response:**

Array of connection objects:

<ResponseField name="provider" type="string">
  Cloud provider identifier:

  * `gcp` - Google Cloud Platform
  * `aws` - Amazon Web Services
  * `azure` - Microsoft Azure
  * `scaleway` - Scaleway
  * `tailscale` - Tailscale VPN
  * `ovh` - OVH Cloud (if enabled)
</ResponseField>

<ResponseField name="account_id" type="string">
  Provider-specific account identifier:

  * GCP: Project ID
  * AWS: Account ID
  * Azure: Subscription ID
  * Scaleway: Organization ID or Access Key
  * Tailscale: Client ID
</ResponseField>

<ResponseField name="account_name" type="string" optional>
  Human-readable account name (e.g., subscription name, project name)
</ResponseField>

<ResponseField name="status" type="string">
  Connection status:

  * `connected` - Active connection
  * `not_connected` - Disconnected
  * `pending` - Setup in progress
  * `error` - Connection error
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of connection creation
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of last update
</ResponseField>

**Example Response:**

```json theme={null}
[
  {
    "provider": "gcp",
    "account_id": "my-gcp-project",
    "account_name": "Production Project",
    "status": "connected",
    "created_at": "2024-03-15T10:00:00Z",
    "updated_at": "2024-03-15T10:00:00Z"
  },
  {
    "provider": "aws",
    "account_id": "123456789012",
    "account_name": "AWS Production",
    "status": "connected",
    "created_at": "2024-03-14T15:30:00Z",
    "updated_at": "2024-03-14T15:30:00Z"
  },
  {
    "provider": "azure",
    "account_id": "sub-abc-123",
    "account_name": "Azure Production",
    "status": "connected",
    "created_at": "2024-03-13T09:00:00Z",
    "updated_at": "2024-03-13T09:00:00Z"
  }
]
```

## Provider Status Endpoints

Each provider has its own status endpoint for detailed information.

### GCP Status

**GET /gcp/status**

Checks GCP connection status by validating stored credentials.

**Response:**

```json theme={null}
{
  "connected": true,
  "provider": "gcp",
  "project_id": "my-gcp-project",
  "has_billing": true
}
```

### AWS Status

**GET /aws/status**

Validates AWS IAM role assumption.

**Response:**

```json theme={null}
{
  "connected": true,
  "provider": "aws",
  "role_arn": "arn:aws:iam::123456789012:role/AuroraRole",
  "account_id": "123456789012"
}
```

### Azure Status

**GET /azure/status**

Checks Azure service principal credentials.

**Response:**

```json theme={null}
{
  "connected": true,
  "provider": "azure",
  "subscription_id": "sub-abc-123",
  "subscription_name": "Azure Production"
}
```

### Scaleway Status

**GET /scaleway\_api/scaleway/status**

Validates Scaleway API credentials with live API call.

**Response:**

```json theme={null}
{
  "connected": true,
  "provider": "scaleway"
}
```

### Tailscale Status

**GET /tailscale\_api/tailscale/status**

Checks Tailscale OAuth connection.

**Response:**

```json theme={null}
{
  "connected": true,
  "provider": "tailscale",
  "tailnet": "example.com",
  "tailnetName": "Example Org"
}
```

## DELETE /api/user\_connections

Disconnect a specific cloud provider connection.

**Authentication:** Required (X-User-ID header)

**Request Body:**

<ParamField path="provider" type="string" required>
  Provider to disconnect (gcp, aws, azure, scaleway, tailscale)
</ParamField>

<ParamField path="account_id" type="string" required>
  Account identifier to disconnect
</ParamField>

**Example Request:**

```json theme={null}
{
  "provider": "gcp",
  "account_id": "my-gcp-project"
}
```

**Response:**

```json theme={null}
{
  "status": "disconnected"
}
```

**Notes:**

* Marks connection as `not_connected` in database
* Does not delete stored credentials (use provider-specific disconnect)
* Can be reconnected without re-authentication

## Available Providers

### Cloud Platforms

<Card title="Google Cloud Platform" icon="google">
  **Provider:** `gcp`

  **Authentication:** OAuth 2.0

  **Capabilities:**

  * Compute Engine
  * Kubernetes Engine (GKE)
  * Cloud Functions
  * Load Balancing
  * IAM Management
</Card>

<Card title="Amazon Web Services" icon="aws">
  **Provider:** `aws`

  **Authentication:** IAM Role Assumption

  **Capabilities:**

  * EC2
  * EKS
  * Lambda
  * VPC
  * IAM
</Card>

<Card title="Microsoft Azure" icon="microsoft">
  **Provider:** `azure`

  **Authentication:** Service Principal

  **Capabilities:**

  * Virtual Machines
  * AKS
  * Azure Functions
  * Virtual Networks
  * RBAC
</Card>

<Card title="Scaleway" icon="server">
  **Provider:** `scaleway`

  **Authentication:** API Keys (Access Key + Secret Key)

  **Capabilities:**

  * Compute Instances
  * Kubernetes Kapsule
  * Object Storage
  * VPC
</Card>

<Card title="Tailscale" icon="shield">
  **Provider:** `tailscale`

  **Authentication:** OAuth Client Credentials

  **Capabilities:**

  * VPN Mesh Network
  * Device Management
  * SSH Access
  * ACL Management
</Card>

### Optional Providers

<Card title="OVH Cloud" icon="cloud">
  **Provider:** `ovh`

  **Authentication:** OAuth 2.0

  **Status:** Feature flag controlled

  **Capabilities:**

  * Compute
  * Kubernetes
  * Object Storage
</Card>

## Connection States

### Connected

Fully authenticated and ready to use.

* Credentials stored securely in Vault
* API access validated
* Can make infrastructure changes

### Not Connected

No active connection.

* No stored credentials
* Requires authentication
* Cannot access provider resources

### Pending

Connection setup in progress.

* OAuth flow initiated
* Post-auth tasks running
* Not yet ready for use

### Error

Connection has errors.

* Invalid credentials
* API access issues
* Requires reconnection

## Best Practices

### Checking Connection Status

1. Use `/api/user_connections` for overview of all providers
2. Use provider-specific endpoints for detailed status
3. Cache status locally to reduce API calls
4. Refresh status after authentication flows

### Multi-Provider Support

```javascript theme={null}
// Fetch all connections
const connections = await fetch('/api/user_connections', {
  headers: { 'X-User-ID': userId }
}).then(r => r.json());

// Group by provider
const byProvider = connections.reduce((acc, conn) => {
  acc[conn.provider] = conn;
  return acc;
}, {});

// Check specific provider
if (byProvider.gcp?.status === 'connected') {
  console.log('GCP is connected');
}
```

### Error Handling

```javascript theme={null}
try {
  const status = await fetch('/api/user_connections');
  
  if (status === 401) {
    // User not authenticated
    redirectToLogin();
  } else if (status === 500) {
    // Server error
    showError('Failed to fetch connections');
  }
} catch (error) {
  // Network error
  showError('Network error');
}
```

## Provider Selection

When multiple providers are connected, Aurora automatically selects the appropriate one based on:

1. **Explicit Selection** - User specifies provider in request
2. **Context** - Infers from previous messages in session
3. **Preference Order** - Uses configured provider preference
4. **First Available** - Defaults to first connected provider

**Example with Multiple Providers:**

```json theme={null}
{
  "query": "Create a VM",
  "user_id": "user_123",
  "session_id": "session_123",
  "provider_preference": ["gcp", "aws"]
}
```

Aurora will try GCP first, fall back to AWS if needed.
