Forum Discussion
elik1001
Jan 03, 2025Copper Contributor
Azure DevOps - How to Publish Artifacts Using REST API in Python?
I'm struggling to implement this functionality and could use some help. Here's my setup: I'm using YAML pipelines in Azure DevOps. Part of the pipeline includes a Python task with a long and compl...
elik1001
Jan 06, 2025Copper Contributor
Hi,
Thanks for your response.
Unfortunately I get the same results. the second part comes back with a 404 page.
INFO:__main__:Creating artifact metadata...
INFO:__main__:Artifact metadata created successfully.
INFO:__main__:Create Pre-Payload Response: {'id': 47056, 'name': 'drop_v4', 'source': None, 'resource': {'type': 'Container', 'data': 'drop_v4', 'properties': {'RootId': 'drop_v4'}, 'url': 'https://dev.azure.com/my_org/c82916f3-4665-43bf-8927-e05a3b6492a9/_apis/build/builds/72710/artifacts?artifactName=drop_v4&api-version=7.1-preview.5', 'downloadUrl': 'https://dev.azure.com/my_org/c82916f3-4665-43bf-8927-e05a3b6492a9/_apis/build/builds/72710/artifacts?artifactName=drop_v4&api-version=7.1-preview.5&%24format=zip'}}
INFO:__main__:Uploading: reports/test-1.json to https://dev.azure.com/my_org/my_project/_apis/resources/Containers/c82916f3-4665-43bf-8927-e05a3b6492a9?itemPath=drop_v4/test-1.json
ERROR:__main__:Failed to upload reports/test-1.json: 404, <!DOCTYPE html >
...
</div>
<div class="error-info">
<div class="title">404 - Page not found</div>
<div class="details">Looks like this page doesn't exist or can't be found. Make sure the URL is correct.</div>
<div class="reference-data">
<div>1/6/2025 1:31:51 PM (UTC)</div>
<div>adcbe8d1-8e32-4c9b-92c0-2586dc535880</div>
</div>
<div class="action-container">
<a class="action" href="https://dev.azure.com/my_org/">
<span>Go back home</span>
</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Thanks in advance.