sholinaty
(sholinaty)
1
Has anyone played around with Query batching / nesting dependant calls in a single Graphql API POST?
my goal here is:
- create an extension, via the addExtension API
- then update voicemail options with the enableVoiceMail call
the extension has to exist before I can run enableVoiceMail… but i’d much rather have a single API call (two calls, one post).
anyone done this before?
as a second question - anyone know if you can trigger an “Apply config” via graphql?
sholinaty
(sholinaty)
2
looks like the reload might be triggerable via:
doreload (input: {}) {
message
status
transaction_id
}
}
sholinaty
(sholinaty)
3
tested it out!
it successfully does ordered tasks!
for those of you playing along from home:
addExtension(
input: {
extensionId: "5998"
name: "twoGraphq test"
tech: "pjsip"
outboundCid: ""
email: "[email protected]"
umEnable: false
vmPassword: "5998"
vmEnable: true
maxContacts: "4"
}
) {status message}
enableVoiceMail(
input:{
extensionId: "5998"
password: "5998"
email: "[email protected]"
pager: ""
saycid: false
envelope: false
attach: true
delete: true
})
{status message}
doreload (input: {})
{message status transaction_id}
}
the above will:
- create a pjsip extension, with max_contacts=4
- update voicemail options, because why the heck not
- trigger an Apply Config / reload so that your user is available and Live.
2 Likes
system
(system)
Closed
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.