airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

`/v1/*/search` always return empty result

Open omid opened this issue 2 years ago • 9 comments

Environment

  • Airbyte version: 0.40.23
  • OS Version / Instance: Arch Linux
  • Deployment: Docker

Current Behavior

No matter what I send. /v1/destinations/search always return empty result: {"destinations":[]}. The same happens to /v1/sources/search and /v1/connections/search

Expected Behavior

It should return the destinations it has found. Like all destinations in the workspace with {"workspaceId":"UUID"}.

Logs

Steps to Reproduce

  1. Create a destination
  2. Send a POST request to /v1/destinations/search with {"name":"NAME_OF_YOU_DESTINATION"} (ref. https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html#post-/v1/destinations/search)
  3. You should see the destination.

omid avatar Dec 05 '22 09:12 omid

Hi @omid , just to double check: are you including the destination ID in the request body?

natalyjazzviolin avatar Dec 05 '22 12:12 natalyjazzviolin

Hey @natalyjazzviolin, no

omid avatar Dec 05 '22 12:12 omid

@natalyjazzviolin should I? 🤔

omid avatar Dec 05 '22 14:12 omid

Note, we are having the same result in 0.40.23,

The empty list is returned anyways, note that this does not happens with source/search or connection/search, it is very specific to destinations.

It is a blocker for us, as our use-case is looking for existing destinations by name, if none exists, create, else retreive id.

IzioDev avatar Dec 07 '22 09:12 IzioDev

@IzioDev as a workaround, you can fetch all destinations and search on your side.

omid avatar Dec 07 '22 09:12 omid

That's what the API should already do, as defined here https://github.com/airbytehq/airbyte/blob/9cb5714cd127fbd6134d68d9a34b023b7940343d/airbyte-server/src/main/java/io/airbyte/server/handlers/DestinationHandler.java#L223-L230

but yes, we could copy/pasta the logic, but we prefer to use native search, as it will release us from maintaining this part of lookup

IzioDev avatar Dec 07 '22 11:12 IzioDev

The bug still exists in 0.40.24 in all 3 endpoints: /v1/destinations/search, /v1/sources/search and /v1/connections/search

omid avatar Dec 08 '22 13:12 omid

Bug seems to be fixed for /v1/sources/search on 0.44.0. The others endpoints still are broken

pcorbel avatar Apr 19 '23 09:04 pcorbel

This is still broken on 0.50.0.

cjwooo avatar Jun 14 '23 03:06 cjwooo

The Configuration API is not supported or maintained for direct use: https://docs.airbyte.com/api-documentation

If the search capabilities of the Airbyte API are lacking, let us know and we can open a dedicated feature request for improving it

pmossman avatar Jun 10 '24 18:06 pmossman