Use REST API download artifact of matrix job

Replace this template with your information

I would like to use REST API to download artifact of matrix jobs

In my gitlab.ci.yaml, I am using matrix as following:

build:phoenix_dependencies_ros2:
  extends:
    - .build
  parallel:
    matrix:
      - ROS_DISTRO:
      	- foxy
      	- galactic
  artifacts:
    name: ${CI_JOB_NAME}_${ROS_DISTRO}
    paths:
      - ${CI_JOB_NAME}_${ROS_DISTRO}.tar

So it will create jobs like:

build:phoenix_dependencies_ros2: [foxy]
build:phoenix_dependencies_ros2: [galactic]

I found this command in download-the-artifacts-archive
my branch name is galactic/devel
I tried

curl -H "PRIVATE-TOKEN: $PROJECT_TOKEN" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/artifacts/galactic/devel/download?job=publish:phoenix_dependencies: [foxy]"

But I got Bad Request
Which job name shall I fill in?

Thanks for taking the time to be thorough in your request, it really helps! :blush: