Summary
The user is trying to build a connector using the low-code YAML method but is facing issues with setting the JSON request body. They have provided a YAML file snippet for reference.
Question
<@U04SE163WC8> I am trying to build a connector using the low-code YAML method. I need to make sure that there is a JSON request body. I am trying to specify it in the YAML file but based on my debug outputs it is still not being set. Can you help? The YAML file is below:
definitions:
schema_loader:
type: JsonFileSchemaLoader
file_path: "./source_virtuous_crm/schemas/{{ parameters.name }}.json"
selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: ["list"]
requester:
type: HttpRequester
url_base: "<https://api.virtuoussoftware.com/api>"
http_method: "POST"
request_options_provider:
request_body_json:
sortBy: "id"
authenticator:
type: BearerAuthenticator
api_token: "{{ config['api_key'] }}"
retriever:
type: SimpleRetriever
record_selector:
$ref: "#/definitions/selector"
paginator:
type: "DefaultPaginator"
page_size_option:
type: "RequestOption"
inject_into: "request_parameter"
field_name: "take"
pagination_strategy:
type: "OffsetIncrement"
page_size: "{{ config['page_size'] }}"
inject_on_first_request: true
page_token_option:
type: "RequestOption"
field_name: "skip"
inject_into: "request_parameter"
requester:
$ref: "#/definitions/requester"
base_stream:
type: DeclarativeStream
retriever:
$ref: "#/definitions/retriever"
schema_loader:
$ref: "#/definitions/schema_loader"
contacts_stream:
$ref: "#/definitions/base_stream"
name: "contacts"
primary_key: "id"
$parameters:
path: "/Contact/Query"
full_contacts_stream:
$ref: "#/definitions/base_stream"
name: "full_contacts"
primary_key: "id"
$parameters:
path: "/Contact/Query/FullContact"
contact_individuals_stream:
$ref: "#/definitions/base_stream"
name: "contact_individuals"
primary_key: "id"
$parameters:
path: "/ContactIndividual/Query"
streams:
- "#/definitions/contacts_stream"
- "#/definitions/full_contacts_stream"
- "#/definitions/contact_individuals_stream"
check:
type: CheckStream
stream_names:
- "contacts"
- "full_contacts"
- "contact_individuals"
spec:
type: Spec
documentation_url: <https://docs.airbyte.com/integrations/sources/virtuous-crm>
connection_specification:
title: Virtuous CRM Spec
type: object
required:
- api_key
additionalProperties: true
properties:
# 'TODO: This schema defines the configuration required for the source. This usually involves metadata such as database and/or authentication information.':
api_key:
type: string
description: Your Virtuous API key. <https://docs.virtuoussoftware.com/#authentication>
airbyte_secret: true
page_size:
type: integer
description: The number of records to request per page. Defaults to 100. Max is 1000.
default: 100
minimum: 1
maximum: 1000```
<br>
---
This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C027KKE4BCZ/p1703608756302819) if you want to access the original thread.
[Join the conversation on Slack](https://slack.airbyte.com)
<sub>
["build-connector", "low-code-yaml", "json-request-body", "yaml-file", "debug"]
</sub>