Skip to main content

Generate Unique IDs (UID/GUID)

Before you begin​

Before proceeding, make sure you know how to create REST Web Services; if you do not, visit the following link:

It is also advisable, before starting this tutorial, to make sure you have basic knowledge of JavaScript.

What is a UID​

A UID (unique identifier), as the name implies, is a unique string across your entire application. It is also known as a GUID (global unique identifier).

To demonstrate UID generation, let's create a service.

Generating UIDs​

We will now demonstrate creating a random UID; it is quite simple because Netuno already includes a function specifically created for this purpose:

_out.println(
_uid.generate()
)

Note that the _out.println() function is only to allow viewing the result on screen when calling the service in the browser

If you have any questions, do not hesitate to contact us through the means presented at the end of the page.

Happy development!