Format JSON array API source data #14611
Unanswered
DuyThaiNgx
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When i use data source with API. My API has input is a Json, this is a example of 1 request:
{
"name": "service 1",
"category": "CAT1",
"owner": "[email protected]",
"members":["[email protected]","[email protected]","[email protected]"]
"fields": [
{
"field_name": "memory",
"field_type": "NUMBER",
"is_monitor": false,
"operator": "BETWEEN",
"value1": 50,
"value2": 150,
"string": null
},
{
"field_name": "cpu",
"field_type": "NUMBER",
"is_monitor": true,
"operator": "BETWEEN",
"value1": 0,
"value2": 1,
"string": null
}
],
"warning_duration": {
"hours": 2,
"minutes": 30
}
}
I have binding:
{
"name": "{{Binding.name}}",
"category": "{{Binding.category}}",
"owner": "{{Binding.owner}}",
"members": ["{{Binding.members}}"],
"fields": {
"field_name": "{{Binding.field_name}}",
"field_type": "{{Binding.field_type}}",
"is_monitor": "{{Binding.is_monitor}}",
"operator": "{{Binding.operator}}",
"value1": "{{Binding.value1}}",
"value2": "{{Binding.value2}}",
"string": "{{Binding.string}}"
},
"warning_duration": {
"hours": "{{Binding.hours}}",
"minutes": "{{Binding.minutes}}"
}
}
I have 2 problems with field "members" and "fields".
"members":["[email protected],[email protected],[email protected]"].
Can anyone tell me how to binding json array format in restful API data source.
Thanks everyone!
Beta Was this translation helpful? Give feedback.
All reactions