Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinity DataSource Nested Object payload #549

Open
asergeant01 opened this issue Nov 14, 2024 · 0 comments
Open

Infinity DataSource Nested Object payload #549

asergeant01 opened this issue Nov 14, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@asergeant01
Copy link

asergeant01 commented Nov 14, 2024

I am following this blog post.

My Update Request "Create Payload" is basically:

var jsonData = {
  "createdBy": createdBy,
  "startsAt": startTime,
  "endsAt": endTime,
  "comment": comment,
  "matchers": matchers
}

return jsonData;

Whereby matchers is a further array of objects that is dynamically build based from form data.

My Query Editor "URL options" body content is the following:

{
  "createdBy": "${payload.createdBy}",
  "startsAt": "${payload.startsAt}",
  "endsAt": "${payload.endsAt}",
  "comment": "${payload.comment}",
  "matchers": ${payload.matchers}
}

This produces the following output on the request:

"executedQueryString": "###############
## URL
###############

https://<HIDDEN>

###############
## Curl Command
###############

curl -X 'POST' -d '{ 
\"createdBy\": \"alan\",
\"startsAt\": \"Thu Nov 14 2024 11:24:27 GMT+0000 (Greenwich Mean Time)\",
\"endsAt\": \"Sat Nov 16 2024 11:24:27 GMT+0000 (Greenwich Mean Time)\",
 \"comment\": \"Alan Test\",
\"matchers\": [object Object],[object Object],[object Object],[object Object]
}' -H 'Accept: application/json;q=0.9,text/plain' -H 'Authorization: Basic xxxxxxxx' -H 'Content-Type: application/json' 'https://<HIDDEN>'"

I would expect it to parse this or alternatively, provide the option to let the developer build the full body in "create payload" and return the JSON.stringify which can be inserted into the body content using ${payload}

@mikhail-vl mikhail-vl added the question Further information is requested label Nov 15, 2024
@mikhail-vl mikhail-vl moved this to Ready in Business Suite Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Ready
Development

No branches or pull requests

4 participants