The Witboost Computational Governance is a service responsible for managing policies and metrics that are used to evaluate resources.
It is a central service that allows the governance team to define policies and metrics that will check each resource in Witboost.
The API allows the governance team to create, update, and delete policies and metrics programmatically.
It also allows the users of these APIs to evaluate resources against these policies and metrics.
In order to contact the Witboost Computational Governance endpoints, you must authenticate using a valid JWT token. For more information, check this page.
The Witboost Computational Governance is meant to be exposed outside of your Kubernetes cluster, so it should be accessible by a domain name within your enterprise network boundaries. Therefore, the base URL of the API will depend on your deployment. Below, we are providing an example base URL, yours may differ.
A resource to be evaluated
| id required | string A unique identifier of the resource. |
| displayName | string |
| version | string Version of the resource. This is an optional field that can be used to differentiate multiple versions of the same resource. |
| environment required | string |
| resourceType required | string |
| descriptor required | string |
| labels | Array of strings Labels to be attached to the evaluation report. |
{- "id": "string",
- "displayName": "string",
- "version": "string",
- "environment": "string",
- "resourceType": "string",
- "descriptor": "string",
- "labels": [
- "string"
]
}{- "reportId": "string"
}A metric object to be registered
| name required | string Name of the metric. This is also used for display purposes. |
| description required | string Description of the metric |
| context required | string (ContextEnum) Enum: "global" "local" |
| strategy required | string (StrategyEnum) Enum: "default" "previous_vs_current" "none" Execution strategy of the governance entity |
| engine required | string (EngineEnum) Enum: "cue" "remote" "governanceAgent" "none" |
| trigger required | string (TriggerEnum) Enum: "active" "passive" |
| timing required | string (TimingEnum) Enum: "deployment" "runtime" |
| interactionType required | string (InteractionTypeEnum) Enum: "user2user" "user2platform" |
required | Array of objects (SelectorModel) |
| preprocessing | Array of strings |
| resourceType required | string Resource type compatible to this metric |
| tags required | Array of strings Descriptive tags to add contextual information on the metric |
| environment required | string Environment where this metric gets executed |
| cronExpression | string Cron expression in Quartz-like syntax with 6 fields that go from seconds to day of week in the following order: Seconds (0-59), Minutes (0-59), Hour of Day (0-23), Day of Month (1-31), Month (1-12), Day Of Week (0-6 where 0 is Monday). The following special characters are not allowed: L, W, LW, #. Time zone: UTC |
| externalUrl | string The external URL to be contacted to trigger the execution of the metric |
object (DomainModel) | |
required | object (ThresholdModel) |
| additionalMetadata required | string |
{- "name": "string",
- "description": "string",
- "context": "global",
- "strategy": "default",
- "engine": "cue",
- "trigger": "active",
- "timing": "deployment",
- "interactionType": "user2user",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "resourceType": "string",
- "tags": [
- "string"
], - "environment": "string",
- "cronExpression": "string",
- "externalUrl": "string",
- "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "additionalMetadata": "string"
}{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}| id-in | string Example: id-in=metric-1,metric-2 Filter by metric ids (comma-separated) |
| env | string Example: env=development,production Filter by policy environments (comma-separated) |
| text | string Example: text=my metric description Filter by name or description (case-insensitive, partial match) |
| status | string Example: status=enabled,grace Filter by statuses (comma-separated) |
| strategy | string Example: strategy=default,previous_vs_current Filter by strategy (comma-separated) |
| timing | string Example: timing=deployment,runtime Filter by timings (comma-separated) |
| trigger | string Example: trigger=active,passive Filter by triggers (comma-separated) |
| context | string Example: context=global,local Filter by contexts (comma-separated) |
| resource-type | string Example: resource-type=dataproduct,biproject Filter by resource-types (comma-separated) |
| sort-by | string Default: "creation_time" Enum: "id" "group_id" "version" "name" "description" "context" "strategy" "timing" "status" "creation_time" "update_time" "cron_expression" "interaction_type" "resource_type" "preprocessing" "engine" "trigger" "severity" "external_url" "environment" "domain" Field name to sort by |
| sort-order | string Default: "asc" Enum: "asc" "desc" Sort order |
| limit | integer Default: 25 Maximum number of items to return |
| offset | integer Default: 0 Number of items to skip |
{- "data": [
- {
- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}
], - "meta": {
- "pagination": {
- "limit": 10,
- "offset": 0,
- "total": 20
}
}
}| id required | string metric unique ID |
The desired status for the metric
| status required | string (StatusEnum) Enum: "draft" "grace" "disabled_grace" "enabled" "disabled" "deprecated" "deleted" Status of the governance entity |
{- "status": "draft"
}{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}| id required | string metric unique ID |
A metric object to be update
| groupId required | string |
| name required | string Name of the metric. This is also used for display purposes. |
| version required | integer |
| description required | string Description of the metric |
| context required | string (ContextEnum) Enum: "global" "local" |
| strategy required | string (StrategyEnum) Enum: "default" "previous_vs_current" "none" Execution strategy of the governance entity |
| engine required | string (EngineEnum) Enum: "cue" "remote" "governanceAgent" "none" |
| trigger required | string (TriggerEnum) Enum: "active" "passive" |
| timing required | string (TimingEnum) Enum: "deployment" "runtime" |
| interactionType required | string (InteractionTypeEnum) Enum: "user2user" "user2platform" |
required | Array of objects (SelectorModel) |
| preprocessing | Array of strings |
| resourceType required | string Resource type compatible to this metric |
| tags required | Array of strings Descriptive tags to add contextual information on the metric |
| environment required | string Environment where this metric gets executed |
| cronExpression | string Cron expression in Quartz-like syntax with 6 fields that go from seconds to day of week in the following order: Seconds (0-59), Minutes (0-59), Hour of Day (0-23), Day of Month (1-31), Month (1-12), Day Of Week (0-6 where 0 is Monday). The following special characters are not allowed: L, W, LW, #. Time zone: UTC |
| externalUrl | string The external URL to be contacted to trigger the execution of the metric |
object (DomainModel) | |
object (ThresholdModel) | |
| additionalMetadata required | string |
{- "groupId": "string",
- "name": "string",
- "version": 0,
- "description": "string",
- "context": "global",
- "strategy": "default",
- "engine": "cue",
- "trigger": "active",
- "timing": "deployment",
- "interactionType": "user2user",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "resourceType": "string",
- "tags": [
- "string"
], - "environment": "string",
- "cronExpression": "string",
- "externalUrl": "string",
- "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "additionalMetadata": "string"
}{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}| id required | string metric unique ID |
{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}| id required | string Metric ID |
Additional options for the test
Array of objects (SelectorModel) Additional selectors to restrict the resources perimeter | |||||||
Array
| |||||||
{- "filters": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
]
}{- "reportId": "string"
}| id required | string passive metric unique ID |
| environment required | string Environment to which these evaluation correspond to |
A list of evaluation results to generate a report. Each result is the consequence of a metric evaluating a resource.
Important! If the provided resource is not already registered in WCG, it will be registered as a primary resource (i.e., a resource within the scope of a perimeter resolver) associated with the resource type of the given metric.
required | object (PushResourceRequestModel) |
required | object (MetricResultModel) |
[- {
- "resource": {
- "id": "string",
- "displayName": "string",
- "descriptor": "string"
}, - "result": {
- "value": 0,
- "errors": [
- "string"
], - "details": { }
}
}
]{- "id": "string",
- "environment": "string",
- "evaluationScope": "evaluation",
- "evaluationResults": [
- {
- "governanceEntityId": "string",
- "governanceEntityStatus": "draft",
- "governanceEntityType": "metric",
- "resource": {
- "id": "string",
- "displayName": "string",
- "environment": "string",
- "resourceType": "string",
- "descriptor": "string"
}, - "outcome": "ok",
- "result": {
- "isError": true,
- "value": 0,
- "thresholdResult": {
- "label": "string",
- "labelColor": "string"
}, - "satisfiesPolicy": true,
- "errors": [
- "string"
], - "details": { }
}, - "creationTime": "2019-08-24T14:15:22Z"
}
], - "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "status": "completedWithSuccess"
}A policy object to be registered
| name required | string Name of the policy. This is also used for display purposes. |
| description required | string Description of the policy |
| context required | string (ContextEnum) Enum: "global" "local" |
| strategy required | string (StrategyEnum) Enum: "default" "previous_vs_current" "none" Execution strategy of the governance entity |
| engine required | string (EngineEnum) Enum: "cue" "remote" "governanceAgent" "none" |
| trigger required | string (TriggerEnum) Enum: "active" "passive" |
| timing required | string (TimingEnum) Enum: "deployment" "runtime" |
| interactionType required | string (InteractionTypeEnum) Enum: "user2user" "user2platform" |
required | Array of objects (SelectorModel) |
| preprocessing | Array of strings |
| resourceType required | string Resource type compatible to this policy |
| tags required | Array of strings Descriptive tags to add contextual information on the policy |
| environment required | string Environment where this policy gets executed |
| cronExpression | string Cron expression in Quartz-like syntax with 6 fields that go from seconds to day of week in the following order: Seconds (0-59), Minutes (0-59), Hour of Day (0-23), Day of Month (1-31), Month (1-12), Day Of Week (0-6 where 0 is Monday). The following special characters are not allowed: L, W, LW, #. Time zone: UTC |
| externalUrl | string If engine is remote, this field contains the external URL to be contacted to trigger the execution of the policy |
| cueScript | string If engine is cue, this field contains the CUE script |
object (GovernanceAgentSpecModel) | |
| severity required | string (SeverityEnum) Enum: "info" "warning" "error" Describes the severity of the governance entity in case of a failing condition |
| additionalMetadata required | string |
{- "name": "string",
- "description": "string",
- "context": "global",
- "strategy": "default",
- "engine": "cue",
- "trigger": "active",
- "timing": "deployment",
- "interactionType": "user2user",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "resourceType": "string",
- "tags": [
- "string"
], - "environment": "string",
- "cronExpression": "string",
- "externalUrl": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "additionalMetadata": "string"
}{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}| id-in | string Example: id-in=policy-1,policy-2 Filter by policy ids (comma-separated) |
| env | string Example: env=development,production Filter by policy environments (comma-separated) |
| text | string Example: text=my policy description Filter by name or description (case-insensitive, partial match) |
| status | string Example: status=enabled,grace Filter by statuses (comma-separated) |
| severity | string Example: severity=warning,error Filter by severities (comma-separated) |
| strategy | string Example: strategy=default,previous_vs_current Filter by strategy (comma-separated) |
| engine | string Example: engine=cue,remote Filter by engines (comma-separated) |
| timing | string Example: timing=deployment,runtime Filter by timings (comma-separated) |
| trigger | string Example: trigger=active,passive Filter by triggers (comma-separated) |
| context | string Example: context=global,local Filter by contexts (comma-separated) |
| resource-type | string Example: resource-type=dataproduct,biproject Filter by resource-types (comma-separated) |
| sort-by | string Default: "creation_time" Enum: "id" "group_id" "version" "name" "description" "context" "strategy" "timing" "status" "creation_time" "update_time" "cron_expression" "interaction_type" "resource_type" "preprocessing" "engine" "trigger" "severity" "external_url" "environment" "domain" Field name to sort by |
| sort-order | string Default: "asc" Enum: "asc" "desc" Sort order |
| limit | integer Default: 25 Maximum number of items to return |
| offset | integer Default: 0 Number of items to skip |
{- "data": [
- {
- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}
], - "meta": {
- "pagination": {
- "limit": 10,
- "offset": 0,
- "total": 20
}
}
}| id required | string policy unique ID |
The desired status for the policy
| status required | string (StatusEnum) Enum: "draft" "grace" "disabled_grace" "enabled" "disabled" "deprecated" "deleted" Status of the governance entity |
{- "status": "draft"
}{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}When the request body does not contain the "resource" object, the policy is tested against its resource perimeter. Otherwise, when the request body contains a valid "resource" object (with id, environment, resourceType and descriptor as required fields), the policy is tested only against this resource, ignoring of any additional filters
| id required | string Policy ID |
Additional options for the test
Array of objects (SelectorModel) Additional selectors to restrict the resources perimeter | |
object (ResourceEvaluationModel) |
When the request body is empty, the policy is tested against its resource perimeter.
{ }{- "reportId": "string"
}| id required | string policy unique ID |
A policy object to be update
| groupId required | string |
| name required | string Name of the policy. This is also used for display purposes. |
| version required | integer |
| description required | string Description of the policy |
| context required | string (ContextEnum) Enum: "global" "local" |
| strategy required | string (StrategyEnum) Enum: "default" "previous_vs_current" "none" Execution strategy of the governance entity |
| engine required | string (EngineEnum) Enum: "cue" "remote" "governanceAgent" "none" |
| trigger required | string (TriggerEnum) Enum: "active" "passive" |
| timing required | string (TimingEnum) Enum: "deployment" "runtime" |
| interactionType required | string (InteractionTypeEnum) Enum: "user2user" "user2platform" |
required | Array of objects (SelectorModel) |
| preprocessing | Array of strings |
| resourceType required | string Resource type compatible to this policy |
| tags required | Array of strings Descriptive tags to add contextual information on the policy |
| environment required | string Environment where this policy gets executed |
| cronExpression | string Cron expression in Quartz-like syntax with 6 fields that go from seconds to day of week in the following order: Seconds (0-59), Minutes (0-59), Hour of Day (0-23), Day of Month (1-31), Month (1-12), Day Of Week (0-6 where 0 is Monday). The following special characters are not allowed: L, W, LW, #. Time zone: UTC |
| externalUrl | string If engine is remote, this field contains the external URL to be contacted to trigger the execution of the policy |
| cueScript | string If engine is cue, this field contains the CUE script |
object (GovernanceAgentSpecModel) | |
| severity required | string (SeverityEnum) Enum: "info" "warning" "error" Describes the severity of the governance entity in case of a failing condition |
| additionalMetadata required | string |
{- "groupId": "string",
- "name": "string",
- "version": 0,
- "description": "string",
- "context": "global",
- "strategy": "default",
- "engine": "cue",
- "trigger": "active",
- "timing": "deployment",
- "interactionType": "user2user",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "resourceType": "string",
- "tags": [
- "string"
], - "environment": "string",
- "cronExpression": "string",
- "externalUrl": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "additionalMetadata": "string"
}{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}| id required | string policy unique ID |
{- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}| id required | string passive policy unique ID |
| environment required | string Environment to which these evaluation correspond to |
A list of evaluation results to generate a report. Each result is the consequence of a policy evaluating a resource.
Important! If the provided resource is not already registered in WCG, it will be registered as a primary resource (i.e., a resource within the scope of a perimeter resolver) associated with the resource type of the given policy.
required | object (PushResourceRequestModel) |
required | object (PolicyResultModel) |
[- {
- "resource": {
- "id": "string",
- "displayName": "string",
- "descriptor": "string"
}, - "result": {
- "satisfiesPolicy": true,
- "errors": [
- "string"
], - "details": { }
}
}
]{- "id": "string",
- "environment": "string",
- "evaluationScope": "evaluation",
- "evaluationResults": [
- {
- "governanceEntityId": "string",
- "governanceEntityStatus": "draft",
- "governanceEntityType": "metric",
- "resource": {
- "id": "string",
- "displayName": "string",
- "environment": "string",
- "resourceType": "string",
- "descriptor": "string"
}, - "outcome": "ok",
- "result": {
- "isError": true,
- "value": 0,
- "thresholdResult": {
- "label": "string",
- "labelColor": "string"
}, - "satisfiesPolicy": true,
- "errors": [
- "string"
], - "details": { }
}, - "creationTime": "2019-08-24T14:15:22Z"
}
], - "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "status": "completedWithSuccess"
}| id required | string Report id |
{- "id": "string",
- "environment": "string",
- "evaluationScope": "evaluation",
- "evaluationResults": [
- {
- "governanceEntityId": "string",
- "governanceEntityStatus": "draft",
- "governanceEntityType": "metric",
- "resource": {
- "id": "string",
- "displayName": "string",
- "environment": "string",
- "resourceType": "string",
- "descriptor": "string"
}, - "outcome": "ok",
- "result": {
- "isError": true,
- "value": 0,
- "thresholdResult": {
- "label": "string",
- "labelColor": "string"
}, - "satisfiesPolicy": true,
- "errors": [
- "string"
], - "details": { }
}, - "creationTime": "2019-08-24T14:15:22Z"
}
], - "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "status": "completedWithSuccess"
}| id required | string Report id |
{- "id": "string",
- "environment": "string",
- "evaluationScope": "evaluation",
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "status": "completedWithSuccess"
}{- "error": "string",
- "code": "string",
- "userMessage": "string",
- "input": "string",
- "inputErrorField": "string",
- "moreInfo": {
- "problems": [
- "string"
], - "solutions": [
- "string"
]
}
}| name required | string Unique resource type name and identifier |
| displayName | string Resource type display name. It defaults to |
object Information about the shape of descriptors of this resource type | |
object Details about the service implementing the perimeter resolver API | |
| cuePreprocessScript | string |
{- "name": "my-resource-type",
- "displayName": "My Resource Type",
- "descriptorConfiguration": {
- "resourceNameField": "id",
- "resourceDisplayNameFields": [
- "domain",
- "name",
- "version"
], - "resourceFilterField": "version"
}, - "resolverConfiguration": {
- "url": "id",
- "path": "v1/resolve",
- "batchSize": 5
}, - "cuePreprocessScript": "string"
}{- "name": "my-resource-type",
- "displayName": "My Resource Type",
- "descriptorConfiguration": {
- "resourceNameField": "id",
- "resourceDisplayNameFields": [
- "domain",
- "name",
- "version"
], - "resourceFilterField": "version"
}, - "resolverConfiguration": {
- "url": "id",
- "path": "v1/resolve",
- "batchSize": 5
}, - "cuePreprocessScript": "string"
}| resourceType required | string Example: my-resource-type Resource type name |
{- "name": "my-resource-type",
- "displayName": "My Resource Type",
- "descriptorConfiguration": {
- "resourceNameField": "id",
- "resourceDisplayNameFields": [
- "domain",
- "name",
- "version"
], - "resourceFilterField": "version"
}, - "resolverConfiguration": {
- "url": "id",
- "path": "v1/resolve",
- "batchSize": 5
}, - "cuePreprocessScript": "string"
}| environment required | string |
| limit required | integer [ 1 .. 50 ] Default: 10 Maximum number of policies to be returned. |
| startDate required | string <date-time> Lower bound of the date interval (inclusive) |
| endDate required | string <date-time> Upper bound of the date interval (inclusive) |
| includePolicyDetails required | boolean Default: false Whether to include full policy details in the results or just policy ids (faster) |
{- "environment": "string",
- "limit": 10,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "includePolicyDetails": false
}[- {
- "policyId": "string",
- "failureRate": 0.8,
- "policy": {
- "id": "string",
- "groupId": "string",
- "status": "draft",
- "name": "string",
- "description": "string",
- "context": "global",
- "interactionType": "user2user",
- "trigger": "active",
- "timing": "deployment",
- "version": 0,
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "selectors": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
], - "preprocessing": [
- "string"
], - "tags": [
- "string"
], - "externalUrl": "string",
- "strategy": "default",
- "engine": "cue",
- "resourceType": "string",
- "cueScript": "string",
- "governanceAgentSpec": {
- "prompt": "string",
- "url": "string"
}, - "severity": "info",
- "environment": "string",
- "cronExpression": "string",
- "thresholds": {
- "expression": "below_or_equal",
- "range": [
- {
- "label": "string",
- "labelColor": "string",
- "value": 0
}
]
}, - "domain": {
- "lowerBound": 0,
- "upperBound": 0
}, - "additionalMetadata": "string"
}
}
]| environment required | string |
| startDate required | string <date-time> Lower bound of the date interval (inclusive) |
| endDate required | string <date-time> Upper bound of the date interval (inclusive) |
{- "environment": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z"
}[- {
- "resourceType": "string",
- "failed": 0,
- "total": 0,
- "noResult": 0
}
]| environment required | string |
| startDate required | string <date-time> Lower bound of the date interval (inclusive) |
| endDate required | string <date-time> Upper bound of the date interval (inclusive) |
| reportLabels | Array of strings If defined, only failed executions linked to an evaluation report containing all these labels will be included in the computation |
{- "environment": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "reportLabels": [
- "deployment"
]
}[- {
- "resourceType": "string",
- "failedEvaluations": 0
}
]Registers the provided resources if not already registered. If a resource already exists, it will be left unmodified and will not be included in the response.
Array of objects Resources with a resource type among the ones registered in WCG. Their descriptor is directly provided by a perimeter resolver. | |
Array of objects Resources derived from a primary resource (the origin resource). Their descriptor is not directly provided by a perimeter resolver, but it is derived by applying transformations to their origin's descriptor. |
{- "primaryResources": [
- {
- "identifier": {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}, - "resourceType": "dataproduct"
}
], - "derivedResources": [
- {
- "identifier": {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}, - "originExternalId": "urn:dmb:dp:my-domain:my-origin-resource:0"
}
]
}{- "registeredResources": [
- {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}
]
}| externalId required | string Example: urn:dmb:dp:my-domain:my-resource:0 Resource external id |
| environment required | string Example: environment=development Resource environment |
{- "identifier": {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}, - "kind": "PRIMARY",
- "resourceType": "dataproduct",
- "originExternalId": "urn:dmb:dp:my-domain:my-origin-resource:0"
}Updates the evaluation status of a resource in relation to a governance entity. If the evaluation status is not currently tracked, it will be registered.
| externalId required | string Example: urn:dmb:dp:my-domain:my-resource:0 Resource external id |
| governanceEntityId required | string Example: 2b3a16c4-5b2a-49a3-8cb7-ecb35c9a1b0a Governance entity id |
| environment required | string Example: environment=development Resource environment |
object If
| |
object If |
{- "resultScheduling": {
- "newValue": {
- "frequency": "0 0 0,12 ? * *",
- "toleranceWindowLength": "PT1H"
}
}, - "lastResultId": {
- "newValue": "3580fd57-c673-4682-891e-eccb20b7a2d4"
}
}{- "identifier": {
- "resourceIdentifier": {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}, - "governanceEntityId": "9efba4e8-a014-4e45-aa67-8063fe3a912f"
}, - "resultScheduling": {
- "frequency": "0 0 0,12 ? * *",
- "toleranceWindowLength": "PT1H"
}, - "lastResultId": "3580fd57-c673-4682-891e-eccb20b7a2d4"
}required | object (FindResourceStatusRequestFilters) |
required | object (FindResourceStatusRequestResultOptions) |
{- "filters": {
- "statusFilter": {
- "identifierIn": [
- {
- "resourceIdentifier": {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}, - "governanceEntityId": "9efba4e8-a014-4e45-aa67-8063fe3a912f"
}
]
}, - "resourceFilter": {
- "identifierIn": [
- {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}
]
}, - "governanceEntityFilter": {
- "idIn": [
- "9efba4e8-a014-4e45-aa67-8063fe3a912f"
], - "typeIn": [
- "metric"
], - "timingIn": [
- "deployment"
], - "statusIn": [
- "draft"
]
}, - "resultFilter": {
- "outcomeIn": [
- "ok"
]
}
}, - "resultOptions": {
- "additionalFields": [
- "LAST_RESULT_RESOURCE_SNAPSHOT"
], - "pagination": {
- "pageSize": 10,
- "cursor": "NTAwMGRkZA=="
}
}
}{- "data": [
- {
- "identifier": {
- "resourceIdentifier": {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}, - "governanceEntityId": "9efba4e8-a014-4e45-aa67-8063fe3a912f"
}, - "resultScheduling": {
- "frequency": "0 0 0,12 ? * *",
- "toleranceWindowLength": "PT1H",
- "expectedResultTime": "2020-01-01T00:00:00Z",
- "acceptableResultTimeLimit": "2020-01-01T01:00:00Z",
- "status": "ON_TIME"
}, - "lastResult": {
- "details": {
- "id": "3580fd57-c673-4682-891e-eccb20b7a2d4",
- "identifier": {
- "reportId": "2860fd57-c673-4682-891e-eccb20b7a2d4",
- "resourceIdentifier": {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}, - "governanceEntityId": "9efba4e8-a014-4e45-aa67-8063fe3a912f"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "outcome": "ok",
- "governanceEntityStatus": "draft"
}, - "resourceSnapshot": {
- "displayName": "My Resource",
- "snapshotName": "SNAPSHOT-1",
- "content": "string"
}, - "resultContent": {
- "isError": true,
- "value": 0,
- "thresholdResult": {
- "label": "string",
- "labelColor": "string"
}, - "satisfiesPolicy": true,
- "errors": [
- "string"
], - "details": { }
}
}
}
], - "meta": {
- "pagination": {
- "pageSize": 10,
- "nextCursor": "NTAwMGRkZA=="
}
}
}| reportId required | string Evaluation report id |
{- "errors": [
- "string"
], - "code": "string",
- "userMessage": "string",
- "input": "string",
- "inputErrorField": "string",
- "moreInfo": {
- "problems": [
- "string"
], - "solutions": [
- "string"
]
}
}