Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Question] Getting JSON from a web service

Is there any easy (or possible) way of getting JSON from a web service hosted on a remote server in order to load the State in an API script? The long and short of it is I have a character generator on my server that has a REST point you can call to get back a JSON object containing a Character. I want to create a macro that calls an API script that I can allow my players to use in order to update the attributes on their characters based on the return from the web service call... basically I want them to be able to spend XP in the char generator I have externally and then hit a button in their journal to "re-sync" the character. Any help, thoughts, or guidance would be great, I just started working with the API a few days ago. Justin
1390293880
Alex L.
Pro
Sheet Author
Justin said: Is there any easy (or possible) way of getting JSON from a web service hosted on a remote server in order to load the State in an API script? The long and short of it is I have a character generator on my server that has a REST point you can call to get back a JSON object containing a Character. I want to create a macro that calls an API script that I can allow my players to use in order to update the attributes on their characters based on the return from the web service call... basically I want them to be able to spend XP in the char generator I have externally and then hit a button in their journal to "re-sync" the character. Any help, thoughts, or guidance would be great, I just started working with the API a few days ago. Justin Riley's last known stance on this was no but you can have a REST api, so if you wait I expect we will be able to do this in reverse once he has time to impliment the REST api.