Hi, Airbyte community! I’m pretty new here, but al...
# replication-troubleshooting
ł
Hi, Airbyte community! I’m pretty new here, but already trying Airbyte API to create an API call to the locally hosted tool. I was able to connect to the instance successfully but I struggle with the
http://localhost:8000/api/v1/sources/create
endpoint. I know I need to pass credentials to the source, namely GSheet, but can’t find a way to find the requested fields for the API call body. Does anyone know where to find the formatted JSON to easily pass the variables to? Appreciate all help 🙂 I got this response:
Copy code
"exceptionStack": [
        "io.airbyte.server.errors.BadObjectSchemaKnownException: The provided configuration does not fulfill the specification. Errors: json schema validation failed when comparing the data to the json schema. ",
        "Errors: $.spreadsheet_id: is missing but it is required, $.credentials: is missing but it is required ",
        "Schema: ",
        "{",
        "  \"type\" : \"object\",",
        "  \"title\" : \"Stripe Source Spec\",",
        "  \"$schema\" : \"http://json-schema.org/draft-07/schema#\",",
        "  \"required\" : [ \"spreadsheet_id\", \"credentials\" ],",
        "  \"properties\" : {",
        "    \"credentials\" : {",
        "      \"type\" : \"object\",",
        "      \"oneOf\" : [ {",
        "        \"type\" : \"object\",",
        "        \"title\" : \"Authenticate via Google (OAuth)\",",
        "        \"required\" : [ \"auth_type\", \"client_id\", \"client_secret\", \"refresh_token\" ],",
        "        \"properties\" : {",
        "          \"auth_type\" : {",
        "            \"type\" : \"string\",",
        "            \"const\" : \"Client\"",
        "          },",
        "          \"client_id\" : {",
        "            \"type\" : \"string\",",
        "            \"title\" : \"Client ID\",",
        "            \"description\" : \"Enter your Google application's Client ID\",",
        "            \"airbyte_secret\" : true",
        "          },",
        "          \"client_secret\" : {",
        "            \"type\" : \"string\",",
        "            \"title\" : \"Client Secret\",",
        "            \"description\" : \"Enter your Google application's Client Secret\",",
        "            \"airbyte_secret\" : true",
        "          },",
        "          \"refresh_token\" : {",
        "            \"type\" : \"string\",",
        "            \"title\" : \"Refresh Token\",",
        "            \"description\" : \"Enter your Google application's refresh token\",",
        "            \"airbyte_secret\" : true",
        "          }",
        "        }",
        "      }, {",
        "        \"type\" : \"object\",",
        "        \"title\" : \"Service Account Key Authentication\",",
        "        \"required\" : [ \"auth_type\", \"service_account_info\" ],",
        "        \"properties\" : {",
        "          \"auth_type\" : {",
        "            \"type\" : \"string\",",
        "            \"const\" : \"Service\"",
        "          },",
        "          \"service_account_info\" : {",
        "            \"type\" : \"string\",",
        "            \"title\" : \"Service Account Information.\",",
        "            \"examples\" : [ \"{ \\\"type\\\": \\\"service_account\\\", \\\"project_id\\\": YOUR_PROJECT_ID, \\\"private_key_id\\\": YOUR_PRIVATE_KEY, ... }\" ],",
        "            \"description\" : \"Enter your Google Cloud <a href=\\\"https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys\\\">service account key</a> in JSON format\",",
        "            \"airbyte_secret\" : true",
        "          }",
        "        }",
        "      } ],",
        "      \"title\" : \"Authentication\",",
        "      \"description\" : \"Credentials for connecting to the Google Sheets API\"",
        "    },",
        "    \"row_batch_size\" : {",
        "      \"type\" : \"integer\",",
        "      \"title\" : \"Row Batch Size\",",
        "      \"default\" : 200,",
        "      \"description\" : \"Number of rows fetched when making a Google Sheet API call. Defaults to 200.\"",
        "    },",
        "    \"spreadsheet_id\" : {",
        "      \"type\" : \"string\",",
        "      \"title\" : \"Spreadsheet Link\",",
        "      \"examples\" : [ \"https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG-arw2xy4HR3D-dwUb/edit\" ],",
        "      \"description\" : \"Enter the link to the Google spreadsheet you want to sync\"",
        "    }",
        "  },",
        "  \"additionalProperties\" : true",
t
Hi, easiest way might be if you actually use the UI to set this connector up once and open the browser dev tools and inspect what's the request that's going to that API, from which you can copy the JSON to use yourself talking directly to the API.
n
Thanks for chiming in, Tim!
t
I've also filed https://github.com/airbytehq/airbyte/issues/22339 to offer an easier way in the UI to copy that JSON. Please feel free to follow that issue to stay updated.
👍 1
ł
Perfect. Thank you, Tim, for this suggestion. Will give it a go