Build Artifact API returns incorrect path

The Build-Artifact endpoint has recently been broken

The leading slash has been removed from path returned by the build artifact API endpoint.

eg. path is now :
path: “home/ubuntu/circleci-testing/baking/cherry-pie.png”,

was previously
path: “/home/ubuntu/circleci-testing/baking/cherry-pie.png”

It should be the later as per the example response.

        node_index: 0,
        path: "/home/ubuntu/circleci-testing/baking/cherry-pie.png",
        pretty_path: "/home/ubuntu/circleci-testing/baking/cherry-pie.png",
        url: ""
        node_index: 0,
        path: "/home/ubuntu/circleci-testing/baking/rhubarb-pie.png",
        pretty_path: "/home/ubuntu/circleci-testing/baking/rhubarb-pie.png",
        url: ""

Although this problem hasn’t been happening for months and has only just appeared in the last few days, you can still list artifacts from about 3 months ago and still see the correct path returned from the API, although projects built since then will not contain the correct path.

Thank you for reporting this issue.

We are currently investigating.

Thanks, Is there any ETA on when this would be fixed. It’s just we use this API as part of our build process to pull in artifacts from seperate builds.

Wondering if I should create a work around.

Thanks for reporting this and forgive the delay getting back to you with a response.

I can confirm that the current response is correct and we don’t plan to change it.

The leading slash has been dropped to accommodate paths on CircleCI 2.0 builds. path is now relative to the project’s root or working_directory.

pretty_path now has the same value as path, so the information in this value is redundant. We are leaving it in the response for backwards compatibility.

I’m updating the docs now to reflect this.

Here’s an example request and response for public build:


[ {
  "path" : "raw-test-output/go-test-report.xml",
  "pretty_path" : "raw-test-output/go-test-report.xml",
  "node_index" : 0,
  "url" : ""
}, {
  "path" : "raw-test-output/go-test.out",
  "pretty_path" : "raw-test-output/go-test.out",
  "node_index" : 0,
  "url" : ""
} ]%