Hi, I'm trying to understand Airbyte's API. I can ...
# replication-troubleshooting
a
Hi, I'm trying to understand Airbyte's API. I can access some endpoints but others I get
405 Not Allowed
. This is cURL example of what I'm doing
Copy code
curl -d '{"sourceDefinitionId": "MY_SOURCE_DEFINITION_ID", "workspaceId": "MY_WORKSPACE_ID_HASH" }' -H 'Authorization: Basic YWlyYnl0ZTpwYXNzd29yZA==' -H "Content-Type: application/json" -H "Accept: application/json" -X POST <http://localhost:8000/v1/source_definition_specifications/get>
Basic authentication is done as described in the docs for OSS version I think
• When authenticating to the Configuration API, you must use Basic Authentication by setting the Authentication Header to Basic and base64 encoding the username and password (which are
airbyte
and
password
by default - so base64 encoding
airbyte:password
results in
YWlyYnl0ZTpwYXNzd29yZA==
). So the full header reads
'Authorization': "Basic YWlyYnl0ZTpwYXNzd29yZA=="
This is the response from Airbyte server
Copy code
<html>
<head><title>405 Not Allowed</title></head><script language="javascript"\>
                window.TRACKING_STRATEGY = "segment";
                window.AIRBYTE_VERSION = "0.40.28";
                window.API_URL = "/api/v1/";
                window.CONNECTOR_BUILDER_API_URL = "/connector-builder-api";
                </script>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.23.3</center>
</body>
</html>
Any idea if what could be happening?
a
hey @Andres Gutierrez please try this
Copy code
curl '<http://localhost:8000/api/v1/source_definition_specifications/get>' \
  -H 'Accept: */*' \
  -H 'Authorization: Basic YWlyYnl0ZTpwYXNzd29yZA==' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  --data-raw '{"sourceDefinitionId":"source def id","workspaceId":"workspace id"}' \
  --compressed \
  --insecure
in your url
/api
missing
a
Great, let me try
Oh, I'm a moron, you're right. I think it was the missing
/api
🙈
Thanks!