Error when using ETL Builder for Pendo Aggregate API in Airbyte

Summary

The user is facing an error when trying to use the ETL Builder for Pendo Aggregate API in Airbyte. The error indicates an issue with the source being empty for aggregation.


Question

Hi Airbyte Community, I am working on a ETL Builder for Pendo Aggreate API.

https://app.pendo.io/api/v1/aggregation

While i am able to get results from POSTMAN using this JSON Load but whenever I paste the same in Airbyte I get below error :

POST Body :

    "response": {
        "mimeType": "application/json"
    },
    "request": {
        "pipeline": [
            {
                "source": {
                    "featureEvents": null,
                    "timeSeries": {
                        "period": "dayRange",
                        "first": "now()",
                        "count": -1
                    }
                }
            }
        ]
    }
}```

_`Error`_

```{
  "status": 400,
  "body": "bad pipeline: aggregation.innerPipelineParse : bad source: empty source found for aggregation\n",
  "headers": {
    "access-control-allow-credentials": "false",
    "access-control-allow-headers": "X-Pendo-Integration-Key,Content-Type",
    "access-control-allow-methods": "GET,POST,PUT,DELETE",
    "access-control-allow-origin": "*",
    "access-control-max-age": "3600",
    "content-type": "text/plain; charset=utf-8",
    "x-content-type-options": "nosniff",
    "date": "Thu, 25 Jan 2024 15:17:45 GMT",
    "Content-Length": "94",
    "x-envoy-upstream-service-time": "180",
    "server": "istio-envoy",
    "Via": "1.1 google",
    "Strict-Transport-Security": "max-age=63072000",
    "Alt-Svc": "clear"
  }
}```

<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/C021JANJ6TY/p1706196084808509) if you want to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["etl-builder", "pendo-aggregate-api", "airbyte", "error", "source-empty"]
</sub>

whole error message

Request to <https://app.pendo.io/api/v1/aggregation> failed with status code 400 and error message None - Traceback (most recent call last):
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/connector_builder/message_grouper.py", line 249, in _read_stream
    yield from AirbyteEntrypoint(source).read(source.spec(self.logger), config, configured_catalog, {})
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py", line 156, in read
    yield from self.source.read(self.logger, config, catalog, state)
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/manifest_declarative_source.py", line 138, in read
    yield from super().read(logger, config, catalog, state)
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 139, in read
    raise e
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 119, in read
    yield from self._read_stream(
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 194, in _read_stream
    for record in record_iterator:
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 304, in _read_full_refresh
    for record_data_or_message in record_data_or_messages:
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/declarative_stream.py", line 104, in read_records
    yield from self.retriever.read_records(stream_slice)
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 304, in read_records
    for stream_data in self._read_pages(self._parse_records, self.state, stream_slice):
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 282, in _read_pages
    response = self._fetch_next_page(stream_state, stream_slice, next_page_token)
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 395, in _fetch_next_page
    return self.requester.send_request(
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/requesters/http_requester.py", line 399, in send_request
    return self._validate_response(response)
  File "/root/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/requesters/http_requester.py", line 496, in _validate_response
    raise ReadException(error_message)
airbyte_cdk.sources.declarative.exceptions.ReadException: Request to <https://app.pendo.io/api/v1/aggregation> failed with status code 400 and error message None```

tried creating another builder for this API and now this is the error :

ERROR
The CDK command `test_read` completed properly but no records nor trace were found. Logs were: 0.