Skip to content

getArtifactContentZip doesn't work for "resource.type": "PipelineArtifact" #432

Open
@kiermasp

Description

@kiermasp

Environment

Node version: 14.15.5
Npm version: 6.14.11
OS and version: Microsoft Windows 10 Enterprise, Version 10.0.18363 Build 18363
azure-devops-node-api version: 10.2.1

Issue Description

IBuildApi.getArtifactContentZip does't work for artifact resource type: PipelineArtifact but it does for type: Container

Expected behaviour

I should be able to get zip from Build Artifacts and Pipeline Artifacts

Actual behaviour

In fiddler I'm getting 404 where the same url working correctly on Web using "Get Artifact URL and pasting to Browser".

Steps to reproduce

  1. IBuildApi.getArtifacts - ensure on list you have artifacts with "resource.type": "PipelineArtifact"
  2. try to fetch it using IBuildApi.getArtifactContentZip()
  3. Fiddler shows 404 and unable to get it.

Logs

REQ
GET https://artprodsu6weu.artifacts.visualstudio.com/Ad2f735ff-1e43-4ce8-826b-9e3578951332/2a4e21b6-7b9c-47c3-9a4f-0430e7a2fec9/_apis/artifact/XXXXXXXXXXXXXXXXXXXX/content?format=zip HTTP/1.1
accept: application/zip;api-version=6.1-preview.5
user-agent: node-Build-api
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X-TFS-FedAuthRedirect: Suppress
Host: artprodsu6weu.artifacts.visualstudio.com
Connection: close

RESP
HTTP/1.1 404 Not Found
P3P: CP="CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions