Are we suppose to create a new uri while adding an existing artifact in module using DNG module API?
I'm trying to add an existing artifact to a module using DNG module API. Actually I'm successfully able to add it. But while new entry for each artifact, we are suppose to give the uri. I think this uri should be unique and non-existing one. when creating a new uri, what format do I suppose to use to maintain unique one ? Because sometimes it's throwing an error.
Data Entry :
Accepted answer
<Module structure resource URI> + "#" + <sequential number>
https://<elmserver>/rm/resources/<module UUID>/structure#<SeqNum>
Comments
Using this pattern (<Module structure resource URI> + "#" + <sequential number> ), I'm able to form new url.
Thank you!
> <Module structure resource URI> + "#" + <sequential number>
In my example python I use a fixed dummy url https://clmwb.com:9444/rdm/resources/_4sscEb43EeeD0-df1VhHuw/structure#1
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER May 14 '24, 8:41 a.m.I am not sure if this is relevant or not.
I have run into situations, where the API required an URI that was not null in some operations e.g. POST. In the case I remember, it was absolutely irrelevant what the URI was, it needed to be an URI e.g. https://nowhere.nothing/ would be ok . In my case the process created a new URI, that was returned in the location header and/or the response body. The one that I passed was pretty much ignored and irrelevant. The only reason for the URI was that it was expected by the API and otherwise the API would throw a null pointer in the parsing process.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER May 14 '24, 8:44 a.m.BTW If you want/expect others to answer your questions, provide the minimum amount of information. Tool, version number. If API, complete request, plus headers, etc. Do not provide information like "Because sometimes it's throwing an error". If there is an error, show it.