How to Download the workflow logs using Github API?

I am trying to get the build logs when the workflow is finished. I have followed this Rest API. But I am getting the following error:


"message": "Not Found",
"documentation_url": ""

API in the workflow.YAML file:

curl --request GET \
          -H "Accept: application/vnd.github.v3+json" \
          --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
          --header 'content-type: application/json' \
${{github.owner}}/${{github.repository}}/actions/runs/${{ github.run_id }}/log

Someone help me what i am doing wrong here!!!