@@ -936,7 +936,7 @@ def get_api_service(self, service_id):
936936 return DSSAPIService (self .client , self .project_key , service_id )
937937
938938 ########################################################
939- # Bundles / Export (Design node)
939+ # Bundles / Export and Publish (Design node)
940940 ########################################################
941941
942942 def list_exported_bundles (self ):
@@ -971,6 +971,18 @@ def download_exported_bundle_archive_to_file(self, bundle_id, path):
971971 f .flush ()
972972 stream .close ()
973973
974+ def publish_bundle (self , bundle_id , published_project_key = None ):
975+ """
976+ Publish a bundle on the Project Deployer.
977+ :param string bundle_id: The identifier of the bundle
978+ :param string published_project_key: The key of the project on the Project Deployer where the bundle will be published.
979+ A new published project will be created if none matches the key.
980+ If the parameter is not set, the key from the current :class:`DSSProject` is used.
981+ """
982+ params = None
983+ if published_project_key is not None :
984+ params = {"publishedProjectKey" : published_project_key }
985+ return self .client ._perform_json ("GET" , "/projects/%s/bundles/%s/publish" % (self .project_key , bundle_id ), params = params )
974986
975987 ########################################################
976988 # Bundles / Import (Automation node)
0 commit comments