Nguyen Dao (Bach)
10/31/2023, 11:25 AMkapa.ai
10/31/2023, 11:26 AM/v1/jobs/{jobId} endpoint in a while loop to check the status of a job every 10 seconds. This is done using a RestClient and the jobId is appended to the base URL. The request headers include "accept", "application/json", "content-type", "application/json", and "Authorization". The response is then deserialized to get the status of the job. If the job is still running, the loop continues; if not, the job details are printed to the console. Here's the code snippet from the extracts: csharp while(jobStatus == "running") { //Gets status of the job client = new RestClient("<https://api.airbyte.com/v1/jobs/>" + jobId);//We add the 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 having trouble with this endpoint, you might want to check if you're following a similar approach. If the issue persists, it would be helpful to have more specific details about the problem. For more information, you can refer to the [Airbyte documentation](https://docs.airbyte.com) or ask for help in the [Airbyte forum](https://discuss.airbyte.io).Nguyen Dao (Bach)
10/31/2023, 11:28 AMkapa.ai
10/31/2023, 11:28 AMkapa.ai
10/31/2023, 11:28 AM/v1/jobs/{jobId} might not work with the open-source version of Airbyte. However, it's important to ensure that you're using the correct base URL for your Airbyte instance. In the provided extracts, the base URL used is <https://api.airbyte.com>, but this may not be the correct base URL for your open-source Airbyte deployment. If you're still facing issues, I recommend checking the [Airbyte documentation](https://docs.airbyte.com/), asking for help in the [Airbyte community Slack](https://slack.airbyte.com/), or opening a [Github issue](https://github.com/airbytehq/airbyte/issues) for further assistance.Nguyen Dao (Bach)
10/31/2023, 11:30 AMkapa.ai
10/31/2023, 11:30 AMkapa.ai
10/31/2023, 11:31 AM<http://localhost:8000>. If you've deployed Airbyte on a server, your base URL would be the server's URL. Please note that the specific port might vary depending on your configuration. The default port for Airbyte is 8000, but this can be changed in your configuration. Remember to replace <https://api.airbyte.com> with your own Airbyte instance's URL when making API requests. For more information on configuring Airbyte, you can refer to the [Airbyte documentation](https://docs.airbyte.com/operator-guides/configuring-airbyte).