You can check the status of metadata and runtime data uploads at any time by querying the Apigee API Hub for Private Cloud connector's local status endpoint.

## Checking upload status

Use the following curl command on the virtual machine running the Apigee API Hub for Private Cloud connector:

```
curl localhost:8080/v1/uapim/status
```
A successful response returns a JSON object similar to the following:

```
  {
 "apiSyncStatus": [
   {
     "organization": "foo",
     "phase": "Preparing",
     "components": [
       "proxy": {
         "lastUpdated": "2025-04-16T00:56:45Z",
         "progress": {
           "totalItems": 100,
           "pendingItems": 90,
           "completedItems": 6,
           "failedItems": 4
         }
       },
       "environment": { //environment upload status
         "lastUpdated": "2025-04-16T00:56:45Z",
         "progress": {
           "totalItems": 5,
           "pendingItems": 1,
           "completedItems": 3,
           "failedItems": 1
         }
       }]
   },
   {
     "organization": "bar",
     "phase": "Processing",
     "components": [
       "proxy": {
         "lastUpdated": "2025-04-16T00:56:45Z",
         "progress": {
           "totalItems": 110,
           "pendingItems": 16,
           "completedItems": 3,
           "failedItems": 1
         }
       },
       "environment": {
         "lastUpdated": "2025-04-16T00:56:45Z",
         "progress": {
           "totalItems": 5,
           "pendingItems": 3,
           "completedItems": 1,
           "failedItems": 1
         }
       }]
   },
   {
     "organization": "test",
     "phase": "Queued",
     "lastUpdated": "2025-04-16T00:56:45Z"
   }
 ],
 "analyticsSyncStatus": [
   {
     "organization": "test",
     "environment": "dev",
     "failedItems": 2,
     "lastUpdated": "2025-04-16T00:56:45Z"
   },
   {
     "organization": "test",
     "environment": "prod",
     "failedItems": 4,
     "lastUpdated": "2025-04-16T00:56:45Z"
   }
 ]
}
```

The output provides insights into:

- **API metadata**: Status of API metadata uploads, including organization, environment, current stage (for example, "Preparing", "Processing", "Queued"), total/completed/pending uploads, error count, and last update time.
- **Runtime metadata**: Status of runtime data uploads, showing organization, environment, error count, and last update time.

## Common issues and troubleshooting steps

If you encounter issues, consult the connector's logs and the status endpoint. The main log file for the Apigee hub connector is located at `/opt/apigee/var/log/edge-uapim-connector/edge-uapim-connector.log`

1. **Apigee API Hub for Private Cloud connector does not start up** :
   - **Check logs** : Examine `/opt/apigee/var/log/edge-uapim-connector/edge-uapim-connector.log` for error messages related to configuration.
   - **Verify settings** : Double-check all configured settings in `uapim-connector.properties` and environment variables.
   - **Pub/sub access** : Verify in the logs if the `opdk-connector` is able to access the provided Pub/Sub topics.
   - **Management server access** : Check logs if `opdk-connector` can successfully call the Apigee management server with the given URL and credentials.
   - **Startup time**: If there are thousands of deployments in your Apigee environment, the Apigee hub connector can take approximately 20-30 minutes to start up.
2. **API metadata does not show up in API hub** :
   - **Connector logs** : Review the `opdk-connector` logs to see if it can access the API metadata Pub/Sub topic and call the management server.
   - **Upload status** : Check the `curl localhost:8080/v1/uapim/status` output. Look for the `APIMetadata` section.
     - Is lastUpdated recent?
     - Is errorCount consistently increasing?
     - What stage is it in?
   - **Exceptions/errors**: Search the logs for any exceptions or errors thrown related to metadata processing.
3. **Runtime data does not show up in API hub** :
   - **Connector logs**: Check if the opdk-connector can access the runtime Pub/Sub topic and call the management server.
   - **Upload status** : Use the `curl localhost:8080/v1/uapim/status` command. Focus on the `RuntimeData` section.
     - Is lastUpdated recent?
     - Is errorCount consistently increasing?
   - **Exceptions/errors**: Look for any exceptions or errors in the logs related to runtime data processing.
   - **Message processor configuration** : Ensure that `message-processor-communication.properties` is correctly configured on all MPs for dual-write, and that MPs have been restarted.
   - **NFS mount**: Verify the NFS mount is correctly configured and accessible by both MPs and the UAPIM connector.
4. **Proxy deployed, but information in API hub is not accurate** :
   - **Wait time**: Allow a few minutes for the data to propagate.
   - **Logs** : Check the `opdk-connector` logs for information about uploaded proxies. This can help identify if the connector is processing the deployment events.