> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Force platform rescan

> Trigger a forced rescan of the platform to discover and refresh all available services and configurations

<Warning>
  **Reference under review.** This endpoint is part of the platform health/discovery surface (Kubernetes-aware). It is an admin / operations endpoint, not a public integration API. For supported integration patterns, see [Consuming FlowX from external apps](/5.9/docs/platform-deep-dive/integrations/consuming-flowx-from-external-apps).
</Warning>

The Force Platform Rescan API endpoint allows you to trigger an immediate rescan of the FlowX platform to discover new or updated services, configurations, and components. This is particularly useful when you've deployed new services or made configuration changes that need to be immediately recognized by the platform.

<Info>
  This endpoint performs a comprehensive scan of the platform infrastructure and may take some time to complete depending on your platform size and complexity.
</Info>

## Endpoint

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X GET '{baseUrl}/api/platform/discover' \
    -H 'Authorization: Bearer YOUR_API_TOKEN' \
    -H 'Cache-Control: no-cache' \
    -H 'Accept: */*'
  ```
</RequestExample>

<ParamField path="baseUrl" type="string" required>
  The base URL of your FlowX platform instance
</ParamField>

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for API authentication. Format: `Bearer YOUR_API_TOKEN`
</ParamField>

<ParamField header="Cache-Control" type="string" default="no-cache">
  Controls caching behavior. Recommended to use `no-cache` to ensure fresh discovery results
</ParamField>

<ParamField header="Accept" type="string" default="*/*">
  Specifies the media types that are acceptable for the response
</ParamField>

<ParamField header="User-Agent" type="string">
  Identifies the client application making the request
</ParamField>

<ParamField header="Accept-Encoding" type="string" default="gzip, deflate, br">
  Specifies the content encoding that the client can understand
</ParamField>

## Response

<ResponseExample>
  ```json Success Response theme={"system"}
  {
    "scanTimestamp": "2024-10-09T14:32:15.847Z",
    "totalServices": 15,
    "healthyServices": 14,
    "unhealthyServices": 1,
    "services": {
      "flowxEngine": {
        "name": "FlowX Engine",
        "version": "5.1.0",
        "status": "healthy",
        "endpoint": "http://flowx-engine:8080",
        "capabilities": ["process-execution", "workflow-management", "business-rules"],
        "lastHealthCheck": "2024-10-09T14:32:10Z"
      },
      "flowxDesigner": {
        "name": "FlowX Designer",
        "version": "5.1.0", 
        "status": "healthy",
        "endpoint": "http://flowx-designer:3000",
        "capabilities": ["process-design", "ui-design", "form-builder"],
        "lastHealthCheck": "2024-10-09T14:32:11Z"
      },
      "flowxAdmin": {
        "name": "FlowX Admin",
        "version": "5.1.0",
        "status": "healthy", 
        "endpoint": "http://flowx-admin:4000",
        "capabilities": ["user-management", "system-config", "monitoring"],
        "lastHealthCheck": "2024-10-09T14:32:12Z"
      },
      "flowxCms": {
        "name": "FlowX CMS",
        "version": "5.1.0",
        "status": "healthy",
        "endpoint": "http://flowx-cms:5000",
        "capabilities": ["content-management", "localization", "asset-management"],
        "lastHealthCheck": "2024-10-09T14:32:13Z"
      },
      "documentManagement": {
        "name": "Document Management Plugin",
        "version": "5.1.0",
        "status": "healthy",
        "endpoint": "http://document-plugin:8081",
        "capabilities": ["document-storage", "file-processing", "document-templates"],
        "lastHealthCheck": "2024-10-09T14:32:14Z"
      },
      "notifications": {
        "name": "Notifications Plugin", 
        "version": "5.1.0",
        "status": "unhealthy",
        "endpoint": "http://notifications-plugin:8082",
        "capabilities": ["email-notifications", "sms-notifications", "push-notifications"],
        "lastHealthCheck": "2024-10-09T14:30:00Z",
        "error": "Connection timeout - service may be down"
      },
      "taskManagement": {
        "name": "Task Management Plugin",
        "version": "5.1.0", 
        "status": "healthy",
        "endpoint": "http://task-plugin:8083",
        "capabilities": ["task-assignment", "task-tracking", "workflow-integration"],
        "lastHealthCheck": "2024-10-09T14:32:15Z"
      }
    },
    "infrastructure": {
      "database": {
        "type": "PostgreSQL",
        "version": "13.7",
        "status": "healthy",
        "connections": {
          "active": 45,
          "idle": 15,
          "max": 100
        },
        "lastHealthCheck": "2024-10-09T14:32:00Z"
      },
      "messageBroker": {
        "type": "Apache Kafka",
        "version": "3.4.0",
        "status": "healthy", 
        "brokers": 3,
        "topics": 28,
        "lastHealthCheck": "2024-10-09T14:32:05Z"
      },
      "redis": {
        "type": "Redis",
        "version": "7.0.11",
        "status": "healthy",
        "memory": {
          "used": "245MB",
          "available": "1GB"
        },
        "lastHealthCheck": "2024-10-09T14:32:08Z"
      }
    },
    "externalIntegrations": {
      "authProvider": {
        "name": "Keycloak",
        "status": "healthy",
        "endpoint": "https://auth.company.com",
        "lastHealthCheck": "2024-10-09T14:32:00Z"
      },
      "documentStorage": {
        "name": "MinIO S3",
        "status": "healthy", 
        "endpoint": "https://storage.company.com",
        "buckets": 12,
        "lastHealthCheck": "2024-10-09T14:32:02Z"
      }
    },
    "summary": {
      "scanDuration": "4.2s",
      "newServicesFound": 0,
      "configurationChanges": 2,
      "issuesDetected": 1,
      "recommendations": [
        "Check notifications plugin connectivity",
        "Consider scaling database connections"
      ]
    }
  }
  ```
</ResponseExample>

<ResponseField name="scanTimestamp" type="string">
  ISO 8601 formatted timestamp of when the platform rescan was completed
</ResponseField>

<ResponseField name="totalServices" type="integer">
  Total number of services discovered during the rescan
</ResponseField>

<ResponseField name="healthyServices" type="integer">
  Number of services that are currently healthy and operational
</ResponseField>

<ResponseField name="unhealthyServices" type="integer">
  Number of services that are experiencing issues or are unreachable
</ResponseField>

<ResponseField name="services" type="object">
  Detailed information about all discovered FlowX platform services

  <Expandable title="Service details">
    <ResponseField name="flowxEngine" type="object">
      Core FlowX Engine service information

      <Expandable title="Engine properties">
        <ResponseField name="name" type="string">
          Display name of the service
        </ResponseField>

        <ResponseField name="version" type="string">
          Current version of the service
        </ResponseField>

        <ResponseField name="status" type="string">
          Health status: `healthy`, `unhealthy`, or `unknown`
        </ResponseField>

        <ResponseField name="endpoint" type="string">
          Service endpoint URL for internal communication
        </ResponseField>

        <ResponseField name="capabilities" type="array">
          List of capabilities provided by this service
        </ResponseField>

        <ResponseField name="lastHealthCheck" type="string">
          Timestamp of the most recent health check
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="flowxDesigner" type="object">
      FlowX Designer service for process and UI design
    </ResponseField>

    <ResponseField name="flowxAdmin" type="object">
      FlowX Admin service for system administration
    </ResponseField>

    <ResponseField name="flowxCms" type="object">
      FlowX CMS service for content management
    </ResponseField>

    <ResponseField name="documentManagement" type="object">
      Document Management Plugin service
    </ResponseField>

    <ResponseField name="notifications" type="object">
      Notifications Plugin service (may include error details if unhealthy)
    </ResponseField>

    <ResponseField name="taskManagement" type="object">
      Task Management Plugin service
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="infrastructure" type="object">
  Information about underlying infrastructure components

  <Expandable title="Infrastructure details">
    <ResponseField name="database" type="object">
      Database system information including connection pool status

      <Expandable title="Database properties">
        <ResponseField name="type" type="string">
          Database type (e.g., PostgreSQL, MySQL)
        </ResponseField>

        <ResponseField name="version" type="string">
          Database version
        </ResponseField>

        <ResponseField name="status" type="string">
          Database health status
        </ResponseField>

        <ResponseField name="connections" type="object">
          Connection pool statistics with active, idle, and maximum connections
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="messageBroker" type="object">
      Message broker information including cluster status
    </ResponseField>

    <ResponseField name="redis" type="object">
      Redis cache information including memory usage
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="externalIntegrations" type="object">
  Status of external system integrations

  <Expandable title="Integration details">
    <ResponseField name="authProvider" type="object">
      Authentication provider (e.g., Keycloak, LDAP) connection status
    </ResponseField>

    <ResponseField name="documentStorage" type="object">
      External document storage system status and metrics
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="summary" type="object">
  Summary information about the rescan operation

  <Expandable title="Summary details">
    <ResponseField name="scanDuration" type="string">
      Time taken to complete the platform rescan
    </ResponseField>

    <ResponseField name="newServicesFound" type="integer">
      Number of new services discovered since the last scan
    </ResponseField>

    <ResponseField name="configurationChanges" type="integer">
      Number of configuration changes detected
    </ResponseField>

    <ResponseField name="issuesDetected" type="integer">
      Number of issues or problems identified during the scan
    </ResponseField>

    <ResponseField name="recommendations" type="array">
      List of recommended actions based on scan results
    </ResponseField>
  </Expandable>
</ResponseField>

## Error Responses

<ResponseExample>
  ```json Authentication Error theme={"system"}
  {
    "error": "Unauthorized",
    "message": "Invalid or missing authentication token",
    "status": 401
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json Server Error theme={"system"}
  {
    "error": "Internal Server Error", 
    "message": "Platform rescan failed due to internal error",
    "status": 500,
    "details": "Connection timeout while discovering services"
  }
  ```
</ResponseExample>

## Usage Examples

### Basic Platform Rescan

<CodeGroup>
  ```javascript Node.js theme={"system"}
  const axios = require('axios');

  async function forcePlatformRescan() {
    try {
      const response = await axios.get(`${baseUrl}/api/platform/discover`, {
        headers: {
          'Authorization': `Bearer ${apiToken}`,
          'Cache-Control': 'no-cache'
        }
      });
      
      const scanResult = response.data;
      
      console.log(`Rescan completed in ${scanResult.summary.scanDuration}`);
      console.log(`Services: ${scanResult.healthyServices}/${scanResult.totalServices} healthy`);
      
      if (scanResult.summary.issuesDetected > 0) {
        console.warn(`Issues detected: ${scanResult.summary.issuesDetected}`);
        scanResult.summary.recommendations.forEach(rec => {
          console.warn(`- ${rec}`);
        });
      }
      
      return scanResult;
    } catch (error) {
      console.error('Rescan failed:', error.response?.data || error.message);
      throw error;
    }
  }
  ```

  ```python Python theme={"system"}
  import requests

  def force_platform_rescan(base_url, api_token):
      headers = {
          'Authorization': f'Bearer {api_token}',
          'Cache-Control': 'no-cache'
      }
      
      try:
          response = requests.get(f'{base_url}/api/platform/discover', headers=headers)
          response.raise_for_status()
          
          scan_result = response.json()
          
          print(f"Rescan completed in {scan_result['summary']['scanDuration']}")
          print(f"Services: {scan_result['healthyServices']}/{scan_result['totalServices']} healthy")
          
          if scan_result['summary']['issuesDetected'] > 0:
              print(f"Issues detected: {scan_result['summary']['issuesDetected']}")
              for recommendation in scan_result['summary']['recommendations']:
                  print(f"- {recommendation}")
          
          return scan_result
      except requests.exceptions.RequestException as e:
          print(f"Rescan failed: {e}")
          raise
  ```

  ```bash cURL theme={"system"}
  # Basic rescan request
  curl -X GET 'https://your-platform.com/api/platform/discover' \
    -H 'Authorization: Bearer YOUR_API_TOKEN' \
    -H 'Cache-Control: no-cache'

  # With verbose output for debugging
  curl -X GET 'https://your-platform.com/api/platform/discover' \
    -H 'Authorization: Bearer YOUR_API_TOKEN' \
    -H 'Cache-Control: no-cache' \
    -v
  ```
</CodeGroup>

## When to Use Force Rescan

<Tabs>
  <Tab title="Service Deployment">
    **After deploying new services**

    Use force rescan when you've deployed new microservices or updated existing ones to ensure the platform recognizes all available endpoints and configurations.

    ```bash theme={"system"}
    # After deployment
    kubectl apply -f new-service.yaml
    # Then trigger rescan
    curl -X GET '/api/platform/discover' -H 'Authorization: Bearer TOKEN'
    ```
  </Tab>

  <Tab title="Configuration Updates">
    **After configuration changes**

    Trigger a rescan when you've updated platform configurations, environment variables, or service registrations that need immediate recognition.
  </Tab>

  <Tab title="Troubleshooting">
    **When services aren't recognized**

    If the platform isn't detecting services or configurations that should be available, a force rescan can help resolve discovery issues.
  </Tab>
</Tabs>


## Related topics

- [Oracle Database](/5.9/docs/platform-deep-dive/integrations/oracle-database.md)
- [PostgreSQL Database](/5.9/docs/platform-deep-dive/integrations/postgresql-database.md)
- [Indexing config guidelines](/5.9/setup-guides/flowx-engine-setup-guide/configuring-elasticsearch-indexing/process-instance-indexing-config-guidelines.md)
- [User task node](/5.9/docs/building-blocks/node/user-task-node.md)
- [FlowX.AI 5.6.0 Release Notes](/release-notes/v5.x/v5.6.0-march-2026/v5.6.0-march-2026.md)
