Hello, I’m building a REST API-based custom connec...
# help-connector-development
q
Hello, I’m building a REST API-based custom connector and what to ask this question In the function
parse_response
, I need to return the data from API as the data while this connector read from source I want to ask how can I access the json_schema where the source schema is being defined in this function
k
A message from kapa.ai
In the
parse_response
function, you are typically dealing with the response data from the API and not directly with the schema. The purpose of this function is to extract and return the objects from the response. However, if you need to access the schema within your connector, you can use the
get_json_schema
method. This method dynamically creates the schema for each stream that is created. For example, the Blog Posts stream will have one schema, Blog Authors would have another schema, and so on. The schema for a given collection is retrieved by creating a CollectionSchema stream for each collection [source](https://airbyte.com/tutorials/extract-data-from-the-webflow-api). In addition, the schema of the records output by the
HTTPStream
is described using JsonSchema. This is typically done by placing a
.json
file per stream in the
schemas
directory in the generated python module. The name of the
.json
file must match the lower snake case name of the corresponding Stream [source](https://docs.airbyte.com/connector-development/cdk-python/http-streams). If you need to access the schema within the stream, you can load these schema files as mentioned in a [forum discussion](https://discuss.airbyte.io/t/2091). However, this is not typically done within the
parse_response
function. Please note that the schema is used to describe the structure of the data, while the
parse_response
function is used to extract the actual data from the API response.