Call to a REST endpoint for latest Job result provides list of artifacts:
curl -H "Accept: application/json" "https://tardigrade-bamboo.internal.atlassian.com/rest/api/latest/result/BAM-FC-REST/latest?expand=artifacts" | json_pp
{
...
"artifacts" : {
"size" : 2,
"max-result" : 2,
"artifact" : [
{
"shared" : false,
"name" : "Build log",
"producerJobKey" : "BAM-FC-REST-14444",
"link" : {
"rel" : "self",
"href" : "https://tardigrade-bamboo.internal.atlassian.com/download/BAM-FC-REST/build_logs/BAM-FC-REST-14444.log"
}
},
{
"prettySizeDescription" : "974 KB",
"size" : 997787,
"link" : {
"rel" : "self",
"href" : "https://tardigrade-bamboo.internal.atlassian.com/build/result/artifactUrlRedirect.action?planKey=BAM-FC-REST&buildNumber=14444&artifactName=PerformanceStats"
},
"shared" : false,
"name" : "PerformanceStats",
"producerJobKey" : "BAM-FC-REST-14444"
}
],
"start-index" : 0
},
}
While DB lists 3 artifacts:
bamboo_server=> select brs.build_key, brs.build_number, a.* bamboo_server-> from buildresultsummary brs bamboo_server-> join brs_artifact_link al on al.producerjobresult_id = brs.buildresultsummary_id bamboo_server-> join artifact a on al.artifact_id = a.artifact_id bamboo_server-> where brs.build_key = 'BAM-FC-REST' bamboo_server-> and brs.build_number = 14444; build_key | build_number | artifact_id | label | artifact_size | chain_artifact | globally_stored | link_type | plan_key | build_number | archiver_type -------------+--------------+-------------+--------------------+---------------+----------------+-----------------+-----------------------------------------------------------------------+-------------+--------------+--------------- BAM-FC-REST | 14444 | 1409091104 | PerformanceStats | 997787 | f | f | com.atlassian.bamboo.plugin.artifact.handler.remote:S3ArtifactHandler | BAM-FC-REST | 14444 | 1 BAM-FC-REST | 14444 | 1409091103 | Cargo Log | 831 | f | f | com.atlassian.bamboo.plugin.artifact.handler.remote:S3ArtifactHandler | BAM-FC-REST | 14444 | 0 BAM-FC-REST | 14444 | 1409091102 | Bamboo Server Logs | 2308554 | f | f | com.atlassian.bamboo.plugin.artifact.handler.remote:S3ArtifactHandler | BAM-FC-REST | 14444 | 0
Workaround:
Parse the contents of the Build Results page to extract the artifacts: /browse/<PLAN-KEY>/latest/artifact