A community member has associated this post with a similar question:
ADF Dataflow issue with source API query
Only moderators can edit this content.
ADF Dataflow issue with source API query
am trying to setup an Azure Data Factory Dataflow.
The source is a REST API from Monday.com which uses GraphQL. The API requires POST method, with 3 headers Content-Type "application/json", API-Version "2025-01 " and Authorization: "API token"
The request body requires a query to pull the data. Heres my query example
{ "query":"query { boards(ids: someid) {items_page(limit: 1) {cursor items {id name column_values {column {title} text}}}}}" }
When i run the dataflow it fails with the following
InvalidOperationException: DSL compilation failed: DF-DSL-001 - DSL stream has parsing errors\\nLine 8 Position 11: body: '{ \\nmismatched input
I have tried placing the query into a single line but it is being rejected by the API source with the following error:
at Source 'source2': Failure to read most recent page request: DF-REST_001- Error response from server: Some(<html> <head><title>400 Bad Request</title></head> <body> <center><h1>400 Bad Request</h1></center> <hr><center>cloudflare</center> </body> </html>), Status code: 400. Please check your request url and body. (url:https://api.monday.com/v2/,request body: Some({ "query":"query { boards(ids: some id) {items_page(limit: 1) { cursor items { id name column_values { column { title } text } } } }}" }), request method: POST
The dataflow JSON is automatically created by ADF which shows this and as you can see it is placing , after the first { and last }
"source(allowSchemaDrift: true,",
" validateSchema: false,",
" inferDriftedColumnTypes: true,",
" format: 'rest',",
" timeout: 30,",
" headers: ['Content-Type' -> 'application/json', 'API-Version' -> '2025-01', 'Authorization' -> 'Some API Token', 'Accept' -> 'application/json'],",
" httpMethod: 'POST',",
" body: '{ ",
"\"query\":\"query { boards(ids: some id) {items_page(limit: 1) { cursor items { id name column_values { column { title } text } } } }}\" ",
"}',",
" paginationRules: ['supportRFC5988' -> 'true'],",
" responseFormat: ['type' -> 'json', 'documentForm' -> 'arrayOfDocuments']) ~> source2">```
jsonrestapigraphqlazure-data-factory
I have also changed the source format option from none to JSON and got a Error 415 response advising to check the URL and/or body