Receive UUID from HTTP-based API

Discussion forum about all things Gupta, OpenText and the community.
SSRJMC
Saudi Arabia
Posts: 30
Joined: 08 May 2017, 12:27
Location: Jeddah,Saudi Arabia

Receive UUID from HTTP-based API

Post by SSRJMC » 19 Dec 2020, 12:10

Could anyone help me ?

I would like to generate UUID from This HTTP-based API
http://www.uuidgenerator.net/api/version4
it's returned as plain text..
how can I call this API and Receive data into datafield using Team Developer..

Regards,
Abdul Rahman.S
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3145
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Receive UUID from HTTP-based API

Post by Dave Rabelink » 21 Dec 2020, 08:37

If you just need a UUID (=GUID in Microsoft world), best use native functions instead of using an online API.

This is using the CDK:
https://wiki.tdcommunity.net/index.php/ ... ate_a_GUID


And this is using CoCreateGuid:
https://wiki.tdcommunity.net/index.php/ ... ate_a_GUID


If you really must use the online API:

Use the sample to call JSON API's:
https://wiki.tdcommunity.net/index.php/ ... ft_XMLHTTP

Use the form REST/JSON tester and paste the URL into the URL field and press execute.

The body (contents) can be retrieved using

Call uHTTP.PropGetresponseText( sResponseText )

uiidgenscreenshot.png
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

chelonet
Argentina
Posts: 73
Joined: 19 Apr 2017, 15:28
Location: Argentina

Re: Receive UUID from HTTP-based API

Post by chelonet » 23 Dec 2020, 16:35

If you use Sql Server, you can use the NEWID () function to generate a UUID.

Example: select LOWER(CONVERT(varchar(254), NEWID() ) ) into :uuid

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests