Download artifacts by pipeline ID and build name

I see at

Is it possible to get artifacts by builds ID, but not by pipeline ID.

My use case: “I am running a long pipeline, I would like to be able to download a previous build artifact within a build”

I am using Docker, I got Docker images already setup for artifact download, they just need a URL to curl and unzip and in my understanding, I got only CI_PIPELINE_ID variable which can be useful.

Thanks you for your help,