Start a Conversation

Unsolved

This post is more than 5 years old

3760

June 30th, 2016 00:00

Unity REST API

Hello

I have to set up a demo of Unity Management using REST API.

I used two things "Firefox + REST Client" and "Google Chrome + Advanced REST Client"

I can do a Get on different item (storage, user, etc)  but when I tried to create a user as an example I had a bad request as a result.

I did a get loginsessioninfo before and it works

Do we have any sample ? I already checked the programmer's guide and the poerpoint related to REST API, but It wasn't helpfull

Thanks for your help

Best regards

Daniel Watelet

8.6K Posts

June 30th, 2016 01:00

Daniel

please concact me offline

Rainer

June 30th, 2016 20:00

If you are just playing with it, the simplest thing is to log into the GUI in one browser tab, and use a second tab for your REST client. That will inherit the authentication. Then you do a GET, look at the returned headers, and copy the CSRF token header into your POST or DELETE request and you should be good to go.

Other than the JSON body of course, the primary difference between get and set is the CSRF token header requirement, so look there first.

There are a couple of sample Perl REST scripts here on ECN as well.

If you are still having trouble post your request URL, body, headers, and the response error code and body you are getting.

1 Rookie

 • 

36 Posts

July 1st, 2016 00:00

Thanks Jim

I solved my problem your answer were helpful

No Events found!

Top