Hi <@U04SE163WC8>, when I run the /jobs/{jobid} on...
# replication-ask-ai
m
Hi @kapa.ai, when I run the /jobs/{jobid} on the API it responds “bytessynced”: 0 and “rowssynced”: 0. This is not correct and i have something different on the UX for the same job
k
It seems like you're experiencing a discrepancy between the API response and the UI display for the same job in Airbyte. This could be due to a variety of reasons, including potential issues with the API or the UI, or perhaps a delay in data synchronization. To monitor the status of a job using the Airbyte API, you can use a loop that checks the job status every 10 seconds, as shown in this [tutorial](https://airbyte.com/tutorials/create-and-monitor-a-data-pipeline-using-the-airbyte-api). Here's the relevant code snippet:
Copy code
csharp while(jobStatus == "running") {  //Gets status of the job  client = new RestClient("<https://api.airbyte.com/v1/jobs/>" + jobId);  request = new RestRequest();  request.AddHeader("accept", "application/json");  request.AddHeader("content-type", "application/json");  request.AddHeader("Authorization", "Bearer {YourApiKey}");  dynamic statusResponse = client.ExecuteGet(request);   //Deserialize response to get the status of the job  apiResponse = JsonConvert.DeserializeObject(statusResponse.Content);  jobStatus = apiResponse.status;   //Waits 10 seconds..  Thread.Sleep(10000);   //Prints info in console depending on the status  if (jobStatus == "running")  {  Console.WriteLine("Job running...");  }  else  {  Console.WriteLine("Job Finished...");  Console.WriteLine(" ");  Console.WriteLine("Sync details:");  Console.WriteLine(" JobId:" + apiResponse.jobId);  Console.WriteLine(" Status:" + jobStatus);  Console.WriteLine(" Rows/Bytes Synced:" + apiResponse.rowsSynced + "/" + apiResponse.bytesSynced);  Console.WriteLine(" Sync Start Time:" + apiResponse.startTime);  Console.WriteLine(" Sync Last Updated:" + apiResponse.lastUpdatedAt);  Console.WriteLine(" Sync Duration:" + apiResponse.duration);  } }
If you're still experiencing issues, it might be helpful to review the sync history in the Airbyte UI as described in the [documentation](https://docs.airbyte.com/cloud/managing-airbyte-cloud/review-sync-history). This can help you monitor the sync performance and identify any potential issues. If the problem persists, I recommend reaching out to Airbyte support for further assistance.