Save packages, per-harness overrides, and MCP servers as a new revision
curl --request PUT \
--url https://harness.example.com/admin/governance-extensions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_revision": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packages": [
{
"id": "<string>",
"version": "<string>",
"source_ref": "<string>",
"sha256": "<string>",
"name": "<string>",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_sources": {},
"settings": {},
"adapters": {}
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_revision: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
packages: [
{
id: '<string>',
version: '<string>',
source_ref: '<string>',
sha256: '<string>',
name: '<string>',
artifact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
platform_sources: {},
settings: {},
adapters: {}
}
]
})
};
fetch('https://harness.example.com/admin/governance-extensions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/admin/governance-extensions"
payload = {
"base_revision": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packages": [
{
"id": "<string>",
"version": "<string>",
"source_ref": "<string>",
"sha256": "<string>",
"name": "<string>",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_sources": {},
"settings": {},
"adapters": {}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"revision": "251e6087-98cf-4861-9668-f09f537d5e4d",
"yaml": "<string>",
"managed_yaml": "<string>",
"document": {
"revision": "251e6087-98cf-4861-9668-f09f537d5e4d",
"allowed_harnesses": [
"<string>"
],
"contract_version": 1,
"required_capabilities": [
"adapter_intervals"
],
"minimum_client_version": "<string>",
"ttl_seconds": 300,
"required": true,
"harnesses": {},
"packages": [
{
"id": "<string>",
"version": "<string>",
"source_ref": "<string>",
"sha256": "<string>",
"name": "<string>",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_sources": {},
"settings": {},
"adapters": {}
}
],
"gateway": {
"type": "<string>",
"proxy_url": "<string>",
"token": "<string>",
"auth_style": "bearer"
},
"session_upload": {
"presign_url": "<string>"
},
"telemetry": {
"sink_url": "<string>"
}
},
"package_audiences": {},
"created_at": "2023-11-07T05:31:56Z"
}Administration
Save packages, per-harness overrides, and MCP servers as a new revision
PUT
/
admin
/
governance-extensions
Save packages, per-harness overrides, and MCP servers as a new revision
curl --request PUT \
--url https://harness.example.com/admin/governance-extensions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_revision": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packages": [
{
"id": "<string>",
"version": "<string>",
"source_ref": "<string>",
"sha256": "<string>",
"name": "<string>",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_sources": {},
"settings": {},
"adapters": {}
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_revision: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
packages: [
{
id: '<string>',
version: '<string>',
source_ref: '<string>',
sha256: '<string>',
name: '<string>',
artifact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
platform_sources: {},
settings: {},
adapters: {}
}
]
})
};
fetch('https://harness.example.com/admin/governance-extensions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/admin/governance-extensions"
payload = {
"base_revision": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packages": [
{
"id": "<string>",
"version": "<string>",
"source_ref": "<string>",
"sha256": "<string>",
"name": "<string>",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_sources": {},
"settings": {},
"adapters": {}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"revision": "251e6087-98cf-4861-9668-f09f537d5e4d",
"yaml": "<string>",
"managed_yaml": "<string>",
"document": {
"revision": "251e6087-98cf-4861-9668-f09f537d5e4d",
"allowed_harnesses": [
"<string>"
],
"contract_version": 1,
"required_capabilities": [
"adapter_intervals"
],
"minimum_client_version": "<string>",
"ttl_seconds": 300,
"required": true,
"harnesses": {},
"packages": [
{
"id": "<string>",
"version": "<string>",
"source_ref": "<string>",
"sha256": "<string>",
"name": "<string>",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_sources": {},
"settings": {},
"adapters": {}
}
],
"gateway": {
"type": "<string>",
"proxy_url": "<string>",
"token": "<string>",
"auth_style": "bearer"
},
"session_upload": {
"presign_url": "<string>"
},
"telemetry": {
"sink_url": "<string>"
}
},
"package_audiences": {},
"created_at": "2023-11-07T05:31:56Z"
}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
Response
Saved governance revision
Example:
"251e6087-98cf-4861-9668-f09f537d5e4d"
Validated organization policy template
Editable policy projection with extension-owned fields omitted
Show child attributes
Show child attributes
Revision-scoped deployment audience keyed by package ID; absent historical records are returned as organization-wide.
Show child attributes
Show child attributes
