Skip to content

How to use JSON string in REST API bindings #8496

Answered by jlangree
jlangree asked this question in Help
Discussion options

You must be logged in to vote

While I still haven't found a way to successfully send a JSON string as a binding in a request, I did figure out how to send the full object in a post body. You simply omit the quotes in the post body. I hate how long that took me to figure out. I just upgraded to v2.0- maybe this is a new-ish feature?

JS function to send form data to binding for REST API:

const addStudent = $("Role Form.Fields.addStudentRole")
const addOwner = $("Role Form.Fields.addOwnerRole")
const addCustom = $("Role Form.Fields.addCustomRole")

const studentRole = addStudent ? {
	name: 'student',
	description: 'for students in the group',
	includeInReports: true
} : null

const ownerRole = addOwner ? {
	name: 'owner',
	

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jlangree
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants