How to get the pipeline names from streamsets using python sdk

57 Views Asked by At

How can list the pipeline names those are available in streamsets using python sdk. We are using id and token generally to connect streamsets and not user name and passoword

i found below referenece but not sure how to get those parameter to be parsed and not sure if the below code is the correct one to fetch the pipelinenames list

Also i seen very less documentation with example for streamsets

import streamsets.sdk as sdk

# Set the StreamSets server URL
base_url = 'http://<streamsets-server>:<port>/rest/v1'

# Set the authentication credentials if required
auth = sdk.SecurityContext('<username>', '<password>')

# Create a client instance
client = sdk.DataCollector(base_url, auth=auth)

# Get the list of pipeline names
pipelines = client.get_pipeline_names()

0

There are 0 best solutions below