DNG : Given a GC URI and Module URI, get all the Artifacts details using API
2 answers
You can try this:
//create new moduleRef for getting all artifacts located in a module
let componentUriToCreate = projectUri.split("/rm/process")[0] + "/rm/rm-projects/" + projectUri.split("project-areas/")[1] + "/components/" + componentUri.split("component/")[1]
let moduleRef = new RM.ArtifactRef(moduleUri, componentUriToCreate, undefined, 'http://www.ibm.com/xmlns/rdm/types/ArtifactFormats#Module')
// get the type and identifier of all artifacts located in the module
RM.Data.getContentsAttributes(moduleRef,[RM.Data.Attributes.ARTIFACT_TYPE, RM.Data.Attributes.IDENTIFIER], function(result){
console.log (result.data)})
I do not know, if you need to tell the attributes as parameters in the function: RM.Data.getContentsAttributes
I think you can get more information out of the documentation: https://jazz.net/wiki/bin/view/Main/RMExtensionsAPI702#GetContentsAttributes
Information about all the public ELM APIs is here https://jazz.net/wiki/bin/view/Deployment/ELMProductAPILanding