<@U04SE163WC8> What endpoint or url to get the job...
# replication-ask-ai
n
@kapa.ai What endpoint or url to get the job status for Airbyte API which is locally deployed
k
To get the job status for Airbyte API which is locally deployed, you can use the following endpoint:
Copy code
<https://api.airbyte.com/v1/jobs/{jobId}>
Replace
{jobId}
with the actual ID of the job you want to monitor. Here is a sample code snippet on how to use this endpoint:
Copy code
csharp //Checks every 10 seconds the status of the job 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);  } }
Please note that you need to replace
{YourApiKey}
with your actual API key. This information is extracted from the [Airbyte tutorial on creating and monitoring a data pipeline using the Airbyte API](https://airbyte.com/tutorials/create-and-monitor-a-data-pipeline-using-the-airbyte-api).
n
@kapa.ai What endpoint or url to get the job status for Airbyte API which is OSS deployed, not airbyte cloud
k
A message from kapa.ai
If you have Airbyte deployed locally (Open Source Software deployment), you would typically use the local host URL to access the Airbyte API. The endpoint to get the job status would be:
Copy code
<http://localhost:8000/api/v1/jobs/{{jobId}}>
Replace
{{jobId}}
with the actual ID of the job you want to monitor. Please note that the above URL assumes that your Airbyte instance is running on the default port 8000. If you have configured it to run on a different port, please adjust the URL accordingly. Here is a sample code snippet on how to use this endpoint:
Copy code
csharp //Checks every 10 seconds the status of the job while(jobStatus == "running") {  //Gets status of the job  client = new RestClient("<http://localhost:8000/api/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);  } }
Please note that you need to replace
{YourApiKey}
with your actual API key. This information is extracted from the [Airbyte tutorial on creating and monitoring a data pipeline using the Airbyte API](https://airbyte.com/tutorials/create-and-monitor-a-data-pipeline-using-the-airbyte-api).
n
@kapa.ai How about an AIrbyte instance with a public IP?
k
A message from kapa.ai
If your Airbyte instance is deployed on a server with a public IP, you would use that IP address in the URL to access the Airbyte API. The endpoint to get the job status would be:
Copy code
http://<your-public-ip>:8000/api/v1/jobs/{{jobId}}
Replace
<your-public-ip>
with the actual public IP address of your server and
{{jobId}}
with the actual ID of the job you want to monitor. Here is a sample code snippet on how to use this endpoint:
Copy code
csharp //Checks every 10 seconds the status of the job while(jobStatus == "running") {  //Gets status of the job  client = new RestClient("http://<your-public-ip>:8000/api/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);  } }
Please note that you need to replace
{YourApiKey}
with your actual API key and
<your-public-ip>
with your server's public IP address. This information is extracted from the [Airbyte tutorial on creating and monitoring a data pipeline using the Airbyte API](https://airbyte.com/tutorials/create-and-monitor-a-data-pipeline-using-the-airbyte-api).
n
@kapa.ai I thought the port of Airbyte API server would be 8006?
k
A message from kapa.ai
Yes, you're correct. The default port for the Airbyte API server is 8001, not 8000. I apologize for the confusion. If you have not changed this during your setup, you should use port 8001 to access the Airbyte API. So, if your Airbyte instance is deployed on a server with a public IP, the correct endpoint to get the job status would be:
Copy code
http://<your-public-ip>:8001/api/v1/jobs/{{jobId}}
Replace
<your-public-ip>
with the actual public IP address of your server and
{{jobId}}
with the actual ID of the job you want to monitor. Here is a sample code snippet on how to use this endpoint:
Copy code
csharp //Checks every 10 seconds the status of the job while(jobStatus == "running") {{  //Gets status of the job  client = new RestClient("http://<your-public-ip>:8001/api/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);  }} }}
Please note that you need to replace
{{YourApiKey}}
with your actual API key and
<your-public-ip>
with your server's public IP address. This information is extracted from the [Airbyte tutorial on creating and monitoring a data pipeline using the Airbyte API](https://airbyte.com/tutorials/create-and-monitor-a-data-pipeline-using-the-airbyte-api).