Muhammad Hassaan Mustafa
10/01/2025, 8:11 AMkapa.ai
10/01/2025, 8:12 AMMuhammad Hassaan Mustafa
10/01/2025, 8:13 AMMuhammad Hassaan Mustafa
10/01/2025, 11:24 AMMuhammad Hassaan Mustafa
10/01/2025, 11:24 AMkapa.ai
10/01/2025, 11:24 AMkapa.ai
10/01/2025, 11:24 AMMuhammad Hassaan Mustafa
10/01/2025, 11:28 AMkapa.ai
10/01/2025, 11:28 AMkapa.ai
10/01/2025, 11:29 AMMuhammad Hassaan Mustafa
10/01/2025, 11:49 AMkapa.ai
10/01/2025, 11:49 AMkapa.ai
10/01/2025, 11:49 AMMuhammad Hassaan Mustafa
10/01/2025, 11:54 AMkapa.ai
10/01/2025, 11:54 AMkapa.ai
10/01/2025, 11:54 AMMuhammad Hassaan Mustafa
10/01/2025, 11:55 AMkapa.ai
10/01/2025, 11:56 AMkapa.ai
10/01/2025, 11:56 AMMuhammad Hassaan Mustafa
10/01/2025, 12:02 PMkapa.ai
10/01/2025, 12:02 PMkapa.ai
10/01/2025, 12:02 PM/api/v1/state/get endpoint with your connection ID to retrieve the current state. 2. Update the state: Modify the state payload to set the cursor (e.g., the date) to the earlier point you want to start syncing from. Then, use the /api/v1/state/create_or_update endpoint to update the state. Example API call to update state: bash curl -X POST "http://localhost:8000/api/v1/state/create_or_update" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "connectionId": "YOUR_CONNECTION_ID", "connectionState": { "stateType": "legacy", "connectionId": "YOUR_CONNECTION_ID", "state": { "events": { "updated_at": "2022-09-17T04:34:40" } } } }' Replace "YOUR_CONNECTION_ID" and the date with your actual values. Important: - Editing the state should be done with care, as incorrect changes can break your syncs. - This approach does not clear your destination data; it only changes where Airbyte resumes syncing from in the source ([API usage example](https://discuss.airbyte.io/t/2698), [Modifying connection state](https://docs.airbyte.com/platform/1.7/cloud/managing-airbyte-cloud/manage-connection-state)). If you need more details on the API endpoints, refer to the [Airbyte API documentation](https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html#post-/v1/state/create_or_update). Summary: Yes, you can use the Airbyte API to update the connection state and fetch historical data without clearing your destination.Muhammad Hassaan Mustafa
10/01/2025, 12:06 PMkapa.ai
10/01/2025, 12:06 PMkapa.ai
10/01/2025, 12:06 PMPOST https://api.airbyte.com/v1/jobs endpoint is used to trigger a sync or reset job for a specific Airbyte connection. When you call this endpoint, you provide the connectionId and specify the jobType (either "sync" or "reset"). This will start a new job for the given connection, either syncing data or resetting the connection as requested. Example request body: json { "connectionId": "your-connection-id", "jobType": "sync" } What it does: - If jobType is "sync", it starts a new sync job for the specified connection. - If jobType is "reset", it starts a reset job for the specified connection. Response: The response includes details about the job, such as the job ID, status, type, start time, and other metadata ([API reference](https://raw.githubusercontent.com/airbytehq/airbyte-platform/f284238f0099c4c0a3542d4c42a88773c45c363d/airbyte-api/src/main/openapi/api.yaml)). For more details and example code, see the [Airbyte API documentation](https://raw.githubusercontent.com/airbytehq/airbyte-platform/f284238f0099c4c0a3542d4c42a88773c45c363d/airbyte-api/src/main/openapi/api.yaml).Muhammad Hassaan Mustafa
10/01/2025, 12:07 PMkapa.ai
10/01/2025, 12:07 PMkapa.ai
10/01/2025, 12:07 PMMuhammad Hassaan Mustafa
10/01/2025, 12:12 PMkapa.ai
10/01/2025, 12:12 PMkapa.ai
10/01/2025, 12:13 PMPOST http://localhost:8000/api/v1/state/create_or_update, it means your Airbyte instance requires authentication and your API request is missing valid credentials. Possible causes and solutions: 1. Authentication is enabled: Recent versions of Airbyte (especially Self-Managed Enterprise and OSS) require authentication for API access. You need to include a valid access token in your API request headers. 2. How to get an access token: - First, obtain your client_id and client_secret from the Airbyte UI under Settings > Applications. - Use these credentials to request an access token: bash curl -X POST http://localhost:8000/api/v1/applications/token \ -H "Content-Type: application/json" \ -d '{"client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET"}' - The response will include an access_token. 3. Include the access token in your API call: Add the following header to your state/create_or_update request: Authorization: Bearer YOUR_ACCESS_TOKEN Example: bash curl -X POST http://localhost:8000/api/v1/state/create_or_update \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ ... }' If you are using an older version of Airbyte or have authentication disabled, you should not need a token. If you are unsure about your authentication setup, check your Airbyte deployment configuration or refer to the authentication documentation for your version [Authentication setup](https://docs.airbyte.com/platform/next/deploying-airbyte/integrations/authentication). Summary: The "unauthorized" error means you need to authenticate your API request. Obtain an access token using your client credentials and include it as a Bearer token in your request headers [Configuring API Access](https://docs.airbyte.com/platform/next/enterprise-setup/api-access-config).Muhammad Hassaan Mustafa
10/01/2025, 12:14 PMkapa.ai
10/01/2025, 12:14 PMkapa.ai
10/01/2025, 12:15 PMPOST /api/v1/state/create_or_update) typically means that your credentials are valid, but your user or application does not have permission to perform the requested action. Based on the knowledge sources, here are the most common causes and solutions: 1. Insufficient Permissions: Application keys (client_id/client_secret) are tied to individual users and their respective permissions. If the user associated with your application key does not have the necessary permissions, you will receive a 403 Forbidden error. Make sure the user has the correct role and access rights in Airbyte [Configuring API Access](https://docs.airbyte.com/platform/next/enterprise-setup/api-access-config). 2. API Endpoint Restrictions: Some endpoints may be restricted based on your Airbyte edition (OSS, Cloud, Enterprise) or deployment configuration. Ensure that the endpoint you are calling is available and permitted for your deployment type. 3. Incorrect API URL or Headers: Double-check that you are using the correct API URL and including the access token as a Bearer token in the Authorization header. 4. Known Issues: There have been reports of permission errors when using the API, especially if the API is accessed incorrectly or if the application key is not set up properly [Permission Issue](https://github.com/airbytehq/airbyte/discussions/49937). What you can do: - Verify that your application key is associated with a user who has sufficient permissions. - Make sure you are using the correct endpoint and including the access token in the Authorization header. - If you are using Airbyte OSS, ensure you are using the /api/public/v1/... path for API calls, as some endpoints differ between Cloud and OSS [How to properly delete a source and destination using Airbyte API?](https://github.com/airbytehq/airbyte/discussions/51531). - If the problem persists, review your Airbyte user roles and permissions, or try generating a new application key with an admin user. If you have checked all of the above and still receive a 403 error, the knowledge sources do not provide further troubleshooting steps for this specific scenario. You may need to consult your Airbyte deployment's logs or reach out to Airbyte support for more detailed assistance.Muhammad Hassaan Mustafa
10/01/2025, 12:19 PMkapa.ai
10/01/2025, 12:19 PMkapa.ai
10/01/2025, 12:19 PM_airbyte_emitted_at (the time Airbyte sent the record to the destination) and _airbyte_ab_id (a unique ID for each record) to the raw tables in BigQuery. This allows you to track when each record was inserted by Airbyte [see example](https://airbyte.com/tutorials/incremental-data-synchronization#step-7). Summary: - Setting the start date to 3 months ago will sync data from that point. - Data will be inserted into BigQuery with their original date fields. - You can track each insert using the _airbyte_emitted_at field in the raw tables. If you need to know the exact time each record was inserted by Airbyte, use the _airbyte_emitted_at field in your BigQuery tables [see tutorial](https://airbyte.com/tutorials/incremental-data-synchronization#step-7).Muhammad Hassaan Mustafa
10/01/2025, 12:21 PMkapa.ai
10/01/2025, 12:21 PMkapa.ai
10/01/2025, 12:21 PMjson { "data": { "workspace": { "id": "...", "name": "...", "url": "..." }, "connection": { "id": "...", "name": "...", "url": "..." }, "source": { "id": "...", "name": "...", "url": "..." }, "destination": { "id": "...", "name": "...", "url": "..." }, "jobId": 9988, "startedAt": "2024-01-01T00:00:00Z", "finishedAt": "2024-01-01T01:00:00Z", "bytesEmitted": 1000, "bytesCommitted": 1000, "recordsEmitted": 89, "recordsCommitted": 89, "bytesEmittedFormatted": "1000 B", "bytesCommittedFormatted": "90 B", "success": true, "durationInSeconds": 3600, "durationFormatted": "1 hours 0 min" } } You can set up webhook notifications in your Airbyte workspace settings. This will notify you after each sync, but not for every individual record insert—notifications are at the sync job level, not per-row [Configure Webhook Notification Settings](https://docs.airbyte.com/platform/1.7/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications#configure-webhook-notification-settings). For more details on configuring webhook notifications and example payloads, see the documentation: - [Set up webhook notifications](https://docs.airbyte.com/platform/next/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications#set-up-webhook-notifications) - [Webhook payload examples](https://docs.airbyte.com/platform/1.7/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications#configure-webhook-notification-settings) Summary: Airbyte can notify you via webhook after each sync job, including information about the number of records inserted, but not for every individual record insert.Muhammad Hassaan Mustafa
10/01/2025, 12:23 PMMuhammad Hassaan Mustafa
10/01/2025, 12:23 PMkapa.ai
10/01/2025, 12:23 PMMuhammad Hassaan Mustafa
10/01/2025, 12:23 PMkapa.ai
10/01/2025, 12:23 PMkapa.ai
10/01/2025, 12:23 PMMuhammad Hassaan Mustafa
10/01/2025, 12:25 PMkapa.ai
10/01/2025, 12:25 PMkapa.ai
10/01/2025, 12:25 PMMuhammad Hassaan Mustafa
10/01/2025, 12:26 PMkapa.ai
10/01/2025, 12:26 PMkapa.ai
10/01/2025, 12:27 PMMuhammad Hassaan Mustafa
10/01/2025, 12:30 PMkapa.ai
10/01/2025, 12:30 PMkapa.ai
10/01/2025, 12:31 PMMuhammad Hassaan Mustafa
10/01/2025, 1:52 PMkapa.ai
10/01/2025, 1:52 PMkapa.ai
10/01/2025, 1:52 PM