Error 405 when trying to create source through Airbyte API

Summary

The user is encountering a 405 error when attempting to create a source through the Airbyte API. The provided code snippet shows the request being made using Python’s requests library.


Question

Hi guys!
I have cloud instance of airbyte running
i am trying to reach it through the API to create source
but I am getting the 405 error

url: <http://172.17.64.72:8000/v1/sources>
headers:
{'Authorization': 'Basic #######', 'accept': 'application/json', 'content-type': 'application/json'}
payload:
{"workspaceId": "ebe864ad-ef54-4227-ba39-da5cde7ab00a", "name": "mailchimp_None_d70eabe5-fa6f-436b-bfe1-8d0c281e0a5c", "configuration": {"sourceType": "mailchimp", "credentials": {"auth_type": "apikey", "apikey": "#####"}}}
code:

        if not payload:
            payload = {}

        payload = self._get_payload(payload)

        headers = self._get_headers()
        request_url = self._build_url(endpoint)

        response = <http://requests.post|requests.post>(
            request_url,
            headers=headers,
            json=json.dumps(payload)
        )
        status = response.status_code

        return response.json(), status```
log:
`DEBUG:urllib3.connectionpool:<http://172.17.64.72:8000> "POST /v1/sources HTTP/1.1" 405 None`

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1706779093705859) if you want to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["api", "error-405", "create-source", "python-requests", "airbyte"]
</sub>