hey, I'm trying to use this api POST /v1/scheduler...
# replication-ask-ai
w
hey, I'm trying to use this api POST /v1/scheduler/sources/discover_schema to fetch source streams with following body But it raised me the following error Could anyone help me with an example since the documentation is poor for this api
Copy code
"message": "Invalid json input. Unrecognized field \"sourceId\" (class io.airbyte.api.model.generated.SourceCoreConfig), not marked as ignorable (3 known properties: \"connectionConfiguration\", \"sourceDefinitionId\", \"workspaceId\"])\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 3, column: 16] (through reference chain: io.airbyte.api.model.generated.SourceCoreConfig[\"sourceId\"]) Unrecognized field \"sourceId\" (class io.airbyte.api.model.generated.SourceCoreConfig), not marked as ignorable",
    "exceptionClassName": "com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException",
(edited) body
Copy code
{
  "sourceDefinitionId": "36c891d9-4bd9-43ac-bad2-10e12756272c",
  "sourceId": "defac237-4986-45d2-9e92-7d7ecfd3b4ae",
  "connectionConfiguration": {
    "start_date": "2017-01-25T00:00:00Z",
    "credentials": {
      "client_id": "****",
      "client_secret": "****",
      "refresh_token": "*****",
      "credentials_title": "OAuth Credentials"
    }
  },
  "workspaceId": "4f3fe24e-5ca9-48e8-8191-a2638cd30229"
}
k
Based on the error message you're receiving, it seems like the
sourceId
field is not recognized in the request body for the
POST /v1/scheduler/sources/discover_schema
endpoint. From the information provided in the extracts, it's not clear if
sourceId
is a valid field for this endpoint. However, in a similar endpoint
/v1/sources/search
, the
sourceId
field is not required. Here's an example of a request body for the
/v1/sources/search
endpoint:
Copy code
json {   "sourceDefinitionId": "183fb0e7-b040-4000-829c-cb193f3b4b01",   "workspaceId": "183fb0e7-b040-4000-819f-ca67547fb701",   "connectionConfiguration": {     "user": "charles"   },   "name": "string",   "sourceName": "string" }
You might want to try removing the
sourceId
field from your request body and see if that resolves the issue. If the problem persists, I would recommend reaching out to the Airbyte community on their [Slack channel](https://airbytehq.slack.com) or [forum](https://discuss.airbyte.io) for further assistance.