Project deployment using python script on deployer

SAURABH
SAURABH Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 26 Partner
edited July 16 in Using Dataiku

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

Tagged:

Answers

  • fsergot
    fsergot Dataiker, Registered, Product Ideas Manager Posts: 118 Dataiker
    edited July 17

    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()

Setup Info
    Tags
      Help me…