Page 1 of 1

Add user and device in REST API

Posted: Fri Mar 08, 2019 6:03 pm
by gabrielnegri
Hello!

Through the REST service, I do a POST to /applications /{applicationid: int}/users and I can create a user. But I can not find the service to create/assign a device for that user.

How can I do this through the REST API?

Thanks!

Re: Add user and device in REST API

Posted: Sat Mar 09, 2019 1:51 pm
by reza_khamooshi
Hello,

Currently, we don't have any REST API for adding devices. We will add this API resource in the future.

Re: Add user and device in REST API

Posted: Sat Mar 09, 2019 3:19 pm
by gabrielnegri
Hi! Thanks for your reply.

Then, Can I do that through Webservice scripting engine?

Regards.

Re: Add user and device in REST API

Posted: Mon Mar 11, 2019 10:34 am
by Josip
No, it is not possible through Web Service Scripts either.

Re: Add user and device in REST API

Posted: Tue Jun 18, 2019 8:58 pm
by flap_152
For reference, we also had to do it and used the SOAP API.

Re: Add user and device in REST API

Posted: Tue Jun 18, 2019 9:29 pm
by johan

Re: Add user and device in REST API

Posted: Wed Jun 19, 2019 4:41 pm
by flap_152
Hello Johan,

Thanks for the link, but I do not see how to set a device/TemplateID for a new user, either at creation or after. I do not see what would be the REST equivalent of the addUserWithUserTemplate SOAP call. Maybe the REST call could be extended to allow this parameter

We currently use a mix of REST (because it is nice and easier to use) and SOAP (to do what REST does not allow)

Re: Add user and device in REST API

Posted: Wed Jun 19, 2019 5:24 pm
by johan
Read the guide again :-)

You have all those resources there for REST. They are the same.

Re: Add user and device in REST API

Posted: Thu Jun 20, 2019 10:46 pm
by flap_152
Well I re-read the guide and looked at the Swagger API documentation, then I noticed how recent the guide was. Could it be that a recent update added this information in the API? I made the plugin update and the new structure appeared. Good!

Is there a "public" instance of GpsGate server to look at the latest/official REST API syntax, before we install / make updates (http://public_instance/comGpsGate/api/v.1/test )?