Requesting a new ID
The REST API provides a mean to obtain a new unique identifier. This is useful when creating object hierarchies where objects are required to point to each other. By generating their IDs first, the application can submit objects only once.
Method
GET
URL
<server>/file.ashx
Parameters
generateids |
Contains the number of identifiers to be created |
Returns
If completed (200 code), this call returns a JSON array of strings where each string corresponds to a newly created ID:
["21CB001A697043ACBF84F54BCB1244F3"]
Example (PowerShell)
This GET call creates one new unique identifier:
Invoke-WebRequest -Uri "http://localhost:58697/file.ashx?generateids=1" -Headers @{ "User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" "Accept"="*/*" "Sec-Fetch-Site"="same-origin" "Sec-Fetch-Mode"="cors" "Sec-Fetch-Dest"="empty" "Referer"="http://localhost:58697/cloud/project.html?id=D9927BF62BFA4CCD930CBC716601D09C" "Accept-Encoding"="gzip, deflate, br" "Accept-Language"="en-US,en;q=0.9,es;q=0.8" } |