Release Automation

Expand all | Collapse all

Why is it possible to add artifacts to an package but not to delete them?

Jump to Best Answer
  • 1.  Why is it possible to add artifacts to an package but not to delete them?

    Posted 10-20-2014 05:35 AM

    Hello,

    there are actions to add artifacts to an package but no actions to delete them.

    It is possible to delete from an package manually . Why is there no action for that?



  • 2.  Re: Why is it possible to add artifacts to an package but not to delete them?
    Best Answer

    Posted 10-23-2014 02:01 AM

    Hi

    Not sure why there isn't action for removing artifact from package (You can raise ER for adding this action) but this can be done using REST calls as temporary solution.

    In order to remove artifact from package you need both artifact and package ID's , while package ID is built in parameter  the artifact ID can retrive in two actions

    1.REST call http://localhost:8080/datamanagement/a/api/v3/artifact-version-details while artifact info in the body (This should be post method)

    2.Use "Json - Extract properties from a Json object" action to get the artifact ID from the REST output

    3.Once you have Package and Artifact IDs use the following REST to remove the artifact from package: http://localhost:8080/datamanagement/a/artifact_packages/packageID/artifact_versions/ArtifactID (e.g http://localhost:8080/datamanagement/a/artifact_packages/266/artifact_versions/2889 , this should be delete method

     

    Thanks

    Jacky



  • 3.  Re: Why is it possible to add artifacts to an package but not to delete them?

    Posted 10-23-2014 05:32 AM

    Hi Jacky,

     

    are you sure that the last URL is correct? Where is this REST Method documented?

     

    Thanks

    Michael



  • 4.  Re: Why is it possible to add artifacts to an package but not to delete them?

    Posted 10-23-2014 06:06 AM

    OK, understood what you ment with your last statement. You must use the "DELETE" REST method.