Resolve, hash, and optionally mirror a managed repository source
curl --request POST \
--url https://harness.example.com/admin/package-source/inspect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_ref": "github:BlocksOrg/agent-extensions@v1.2.0"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({source_ref: 'github:BlocksOrg/agent-extensions@v1.2.0'})
};
fetch('https://harness.example.com/admin/package-source/inspect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/admin/package-source/inspect"
payload = { "source_ref": "github:BlocksOrg/agent-extensions@v1.2.0" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"source_ref": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_commit": "<string>"
}Administration
Resolve, hash, and optionally mirror a managed repository source
POST
/
admin
/
package-source
/
inspect
Resolve, hash, and optionally mirror a managed repository source
curl --request POST \
--url https://harness.example.com/admin/package-source/inspect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_ref": "github:BlocksOrg/agent-extensions@v1.2.0"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({source_ref: 'github:BlocksOrg/agent-extensions@v1.2.0'})
};
fetch('https://harness.example.com/admin/package-source/inspect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/admin/package-source/inspect"
payload = { "source_ref": "github:BlocksOrg/agent-extensions@v1.2.0" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"source_ref": "<string>",
"sha256": "<string>",
"size_bytes": 123,
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_commit": "<string>"
}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.
Body
application/json
- Option 1
- Option 2
Public GitHub source in github:owner/repository@ref form or an immutable public HTTPS .tar.gz URL
Examples:
"github:BlocksOrg/agent-extensions@v1.2.0"
"https://packages.example/extension-1.2.0.tar.gz"
