Download artifacts by pipeline ID and build name

I see at

https://docs.gitlab.com/ce/api/pipelines.html
https://docs.gitlab.com/ce/api/builds.html

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,

Tom