Create a short-lived download request for an organization-scoped package artifact
curl --request POST \
--url https://harness.example.com/package-artifacts/{id}/download \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://harness.example.com/package-artifacts/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/package-artifacts/{id}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"url": "<string>",
"method": "GET",
"headers": {},
"expires_in_seconds": 123
}Governance
Create a short-lived download request for an organization-scoped package artifact
POST
/
package-artifacts
/
{id}
/
download
Create a short-lived download request for an organization-scoped package artifact
curl --request POST \
--url https://harness.example.com/package-artifacts/{id}/download \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://harness.example.com/package-artifacts/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/package-artifacts/{id}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"url": "<string>",
"method": "GET",
"headers": {},
"expires_in_seconds": 123
}Authorizations
OAuth 2.0 access token obtained through RFC 8628 at /api/auth/device/code and /api/auth/oauth2/token. The API enforces governance:read, session:write, and client-status:write as appropriate.
