When I try to use the Airbyte API with local docke...
# ask-ai
p
When I try to use the Airbyte API with local docker-compose deployment I keep getting the error "('Object not found.', 404)" for all api endpoints except "/public/health". How can I fix that?
k
To resolve the issue of receiving a "404 Object not found" error for all API endpoints except "/public/health" when using the Airbyte API with a local docker-compose deployment, you can follow these steps: 1. Check the Connection ID: Ensure that you are using the correct connection ID in your API requests. A wrong connection ID can lead to a 404 error. This was a common issue as noted in the forum post: > "Realized what the problem was now, it’s just that I put the wrong connection id." [Source](https://discuss.airbyte.io/t/2980) 2. Set the
AIRBYTE_API_HOST
Environment Variable
: If you are encountering issues with the API endpoints, it might be due to missing environment variables. Specifically, the
AIRBYTE_API_HOST
variable needs to be set in the
airbyte-server
container. Here is how you can add it to your
docker-compose.yml
file:
Copy code
yaml    server:      image: airbyte/server:${VERSION}      logging: *default-logging      container_name: airbyte-server      restart: unless-stopped      environment:        - AIRBYTE_API_HOST=${AIRBYTE_API_HOST}        - AIRBYTE_ROLE=${AIRBYTE_ROLE:-}        - AIRBYTE_VERSION=${VERSION}        ...
This was a solution provided in a GitHub issue: > "I’ve fixed the issue by adding the
AIRBYTE_API_HOST
variable to the environment of the
airbyte-server
container." [Source](https://github.com/airbytehq/airbyte/issues/37848) 3. Upgrade Airbyte Version: Ensure that you are using an updated version of Airbyte. Some issues have been fixed in later versions. For instance, upgrading to version 0.59.1 or later might resolve your issue: > "This was fixed in [commit](https://github.com/airbytehq/airbyte-platform/commit/679f6eb0ee7398b3691d2ef526441fd74c284fa9) please upgrade to version +0.59.1" [Source](https://github.com/airbytehq/airbyte/issues/37848) By following these steps, you should be able to resolve the 404 errors and successfully use the Airbyte API with your local docker-compose deployment. If the problem persists, consider checking the Airbyte documentation or reaching out to the Airbyte community for further assistance.
p
@kapa.ai The "AIRBYTE_API_HOST" is set to value "airbyte-api-server:8006", but shoudnt it be "http://localhost:8001"?
k
It seems like there is some confusion regarding the
AIRBYTE_API_HOST
environment variable. Based on the information provided in the knowledge sources, the
INTERNAL_API_HOST
should indeed include the
http://
scheme to avoid issues. From the [GitHub issue #29506](https://github.com/airbytehq/airbyte/issues/29506), it was confirmed that adding
http://
to the
INTERNAL_API_HOST
in the environment configuration map fixes the issue. The default value
airbyte-airbyte-server-svc:8001
without the scheme
http://
was causing problems. Here is the relevant comment from the issue: > Edit: Confirmed. Adding
http://
to the
INTERNAL_API_HOST
in the env config map fixes it. Therefore, if your
AIRBYTE_API_HOST
is set to
airbyte-api-server:8006
, it should be updated to include the
http://
scheme, like so:
Copy code
shell AIRBYTE_API_HOST=<http://localhost:8001>
This change ensures that the host is correctly interpreted as a URL. For further details, you can refer to the [GitHub issue #29506](https://github.com/airbytehq/airbyte/issues/29506). If you continue to face issues, you might want to check if there are other environment variables or configurations that need similar updates.