Download

[Plugin] Http/s REST, blueprintable JSON query and Parse API manager [VaRest]

I’m glad to announce that VaRest release candidate is officially out! :slight_smile: Today plugin is ready for use, so I’ve decided to make a thread in “Released projects”.

VaRest is the plugin for Unreal Engine 4 that makes REST server communications simple to use with full Json query support.

Current version: 1.1 RC 8

Key Features:

  • Flexible Http/Https request management with support of different Verbs and Content Types
  • No C++ coding required, everything can be managed via blueprints
  • Blueprintable Json wrapper with almost full support of Json features: different types of values, arrays, both ways serializarion to FString, etc.
  • Blueprintable FJsonValue wrapper - full Json features made for blueprints!
  • Parse REST API manager to start working with Parse out of the box!

Moreover, plugin is completely** free** and available under MIT open-source license. You can use it in commercial projects, you can modify anything, etc. In other words, you’re in charge.

Check the Wiki](https://github.com/ufna/VaRest/wiki) for plugin usage examples and installation notes.

I’ll be thankfull for plugin testing, feedback and new ideas how to improve the plugin! :slight_smile:

AWESOME WORK! Inspired me to research more into the concept of REST. I sincerely appreciate your contribution.

Great Work! I appreciate your contribution ^^

Can’t save my map after I add a blueprint using JSON. I clear out the reference to the object whenever it’s used but I still get the following error:


Can't save B:/Workspaces/Unreal 4/FirstPlayground/Content/Maps/Example_Map.umap: Graph is linked to object(s) in external map.
External Object(s):
VaRestRequestJSON_27
/Engine/Transient
  
Try to find the chain of references to that object (may take some time)?

Constructor
oyIctEP.png

Events
C1XoamF.png

Let me know if you need more information.

You shouldn’t create requests in constructor. Just do the same logic in BeginPlay and it should be okay.

Btw I’ll take a look how I can improve it.

That solved it, thanks. I was going to have to move it to a function sooner or later anyway.

If you don’t mind do you know the technical reason why?

Just a quote:

If you’ve created something in constructor, engine tries to save it, but fails because of new constucted request is transient.

Awesome. This should be super useful in the future when I get to deal with stats & server browsing!

Thanks, that makes perfect sense. The thread the quote came from is also quite useful.

I hope to see someone leverage this to do non-game stuff with UE4, even. My mind immediately goes to mapping or weather apps that serve REST data. Cmon - Someone make me an Unreal Engine weather clock app with tons of rad effects :slight_smile:

Complex terrain and mapping data with an overlaid real time weather simulation, allowing users to fly around and zoom in and out at will to better visualize incoming storms?

I want to see this.

Hey guys, I tried to add this to my 4.4 project and it wouldn’t launch, it just said it needed to be recompiled. So I did it, but then it said it was unable to recompile, then said something about it being incompatible with my version. Now I can’t turn off the plugin because I can’t launch the editor and I’m afraid I may have lost my work. Any thoughts?

Just remove plugin files manually (from Plugins) folder.

Thank you for responding! That was my second plan of action, but it results in this when I try to launch the project:

Untitled-1.png

Nevermind, I figured out how to disable the plugin: https://answers.unrealengine.com/questions/84205/disable-plugins-outside-of-editor.html

Very much looking forward to the 4.4 binary!

I’ve just tested the plugin with UE 4.4.0, it doesn’t require any changes - you should just full recompile your game project and it will work.

I’ve prepared “pre-build” version too, you can get it here: Release VaRest 1.1-rc6 · ufna/VaRest · GitHub

P.S. - Runtime plugins are not fully supported for content-only projects by engine! So, if you’re using plugins in Content only project you won’t be able to make Shipping build. I hope it will be improved in next releases :frowning:

As promised (somewhere or other), I’ve uploaded the project I created that won me the prize of “most entertaining” at the last hackathon I attended. I utilized the VaRest plugin to hit Best Buy’s API and do some dynamic processing on it. This was more of a proof of concept for me, but it may be useful for someone that wants to see exactly how to implement these blueprint nodes in their project.

I’ve open sourced the project here: https://github.com/alarial/BlastBestBuy

Likely a silly question but can a POST also get an answer back like GET do?

Example: I send a userID through a POST and I get the user’s name and age for example?

Once you made a POST request you will get the answer. You can put into anything you want :slight_smile:

Great, thank you.

How does authentication typically happen with a REST API using UE4 and your plugin?

Our game will release on Steam which has a WEB API to authenticate users.

The way it works is like this:
On the client the user requests a token to Steam
The client receives it and give it to our REST server
The REST server sends it to Steam and steam confirms this user owns the game.

From there it seems we have to handle everything ourselves.

In our game for instance once we know he owns our game we want to allow him to perform a series of operations on the REST API through POST. The problem I see are the following:

  1. What should you do on the REST web server to remember who is authenticated and who isn’t? Is this the job of SSL or some other HTML authentication method?
  2. How do you prevent hackers to forge a JSON request manually and POST it on the REST API?

Lastly, do you have a Paypal donation page, we’ll very likely use your plugin :slight_smile: