microsoft / azure-devops-python-api

Azure DevOps Python API
https://docs.microsoft.com/azure/devops/integrate/index?view=azure-devops
MIT License
588 stars 200 forks source link

No documentation at all on how to get the pipelines for example. A link to the rest API does not help #437

Open sijucm opened 2 years ago

sijucm commented 2 years ago

I have no idea how to use this API. I hope Microsoft guys can take some time to write some useful API documentation. Wasting of timing trying to find some information is the feeling I'm left with when trying to find a way around Microsoft created things.

howardjones commented 1 year ago
from azure.devops.connection import Connection
from msrest.authentication import BasicAuthentication

credentials = BasicAuthentication('', ado_personal_access_token)
connection = Connection(base_url=organization_url, creds=credentials)
pipeline_client = connection.clients_v6_0.get_pipelines_client()
pipelist = pipeline_client.list_pipelines("projectname")
# pipelist is now a list of Pipeline objects

The Pipeline objects are pretty useless though - there doesn't seem to be any way to find a link between a git repo and a pipeline, or a build and a pipeline, even though both can be seen in the ADO portal itself.