Rahul Padhy
05/25/2021, 11:41 AMimport requests
BASE_URL = '<http://localhost:8001/api>'
get_source = '/v1/sources/get'
file_source = {"sourceDefinitionId": "778daa7c-feaf-4db6-96f3-70fd645acc77"}
full_url = BASE_URL + get_source
response = <http://requests.post|requests.post>(full_url, json=file_source)
print (response.text)
And here’s the output that I’m getting :-
{"message":"Invalid JSON","details":"Unrecognized field \"sourceDefinitionId\" (class io.airbyte.api.model.SourceIdRequestBody), not marked as ignorable"}
I’d gotten the sourceDefinitionId for source type Files from the response of the list-all-sourceDefinitions endpoint -> https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html#post-/v1/source_definitions/list
Please do tell me where I’m going wrong.[DEPRECATED] Marcos Marx
/v1/sources/get
the request is[DEPRECATED] Marcos Marx
Rahul Padhy
05/25/2021, 11:58 AM{"message":"Could not find configuration for SOURCE_CONNECTION: 778daa7c-feaf-4db6-96f3-70fd645acc77."}
But, using the endpoint for getting info about all the sources, I’d gotten the above uuid for the File source.
{
"sourceDefinitionId":"778daa7c-feaf-4db6-96f3-70fd645acc77",
"name":"File",
"dockerRepository":"airbyte/source-file",
"dockerImageTag":"0.2.2",
"documentationUrl":"<https://hub.docker.com/r/airbyte/source-file>",
"icon":"<svg xmlns=\"<http://www.w3.org/2000/svg>\" enable-background=\"new 0 0 24 24\" viewBox=\"0 0 24 24\" fill=\"black\" width=\"24px\" height=\"24px\"><g><rect fill=\"none\" height=\"24\" width=\"24\"/><path d=\"M20.41,8.41l-4.83-4.83C15.21,3.21,14.7,3,14.17,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V9.83 C21,9.3,20.79,8.79,20.41,8.41z M7,7h7v2H7V7z M17,17H7v-2h10V17z M17,13H7v-2h10V13z\"/></g></svg>"
}
Rahul Padhy
05/25/2021, 12:20 PM[DEPRECATED] Marcos Marx