Project deployment using python script on deployer

saurabh
Level 3
Project deployment using python script on deployer

Hi Team,
we are using the below script  to deploy project but getting the error : 

DataikuException: com.dataiku.dip.server.controllers.NotFoundException: API service does not exist: TESTING_2

import dataikuapi
import json
host = "https://dss-dataiku:1999"
apiKey= "oNnek9DtMI"
client = dataikuapi.DSSClient(host,apiKey)
client._session.verify=False
deployer = client.get_apideployer()
project = 'TESTING_2'
infra = 'AUTOMATION'
bundle = 'V2'
deployment_id = '%s-%s-on-%s' % (project, bundle, infra)
deployment = deployer.create_deployment(deployment_id, project, infra, bundle)
update = deployment.start_update()
update.wait_for_result()


Operating system used: linux

0 Kudos
1 Reply
fsergot
Dataiker

Hello @saurabh ,

The error lies in 

deployer = client.get_apideployer()

.

You are deploying a project bundle here, and this is done by project deployer and not api deployer. You need to use rather:

deployer = client.get_projectdeployer()

 

0 Kudos