Lately, I've been getting {"message": "Not found"} when downloading logs from CircleCI v2 projects. Need to investigate and figure out what the right URL should be.
// URL we are trying to fetch looks like:
// https://circleci.com/api/v1.1/project/github/Shyp/go-circle/11/output/9/0
uri := fmt.Sprintf("/%s/%s/%s/%d/output/%d/%d?circle-token=%s", cb.VCSType, cb.Username, cb.RepoName, cb.BuildNum, failure[0], failure[1], token)
req, err := v11client.NewRequest("GET", uri, nil)
if err != nil {
return err
}
It might be as simple as updating the API url to v2. Orrrr we might need to make it conditional on the version of the project.
Lately, I've been getting
{"message": "Not found"}when downloading logs from CircleCI v2 projects. Need to investigate and figure out what the right URL should be.It might be as simple as updating the API url to v2. Orrrr we might need to make it conditional on the version of the project.