Computational Governance API
Read this page in wide view mode from here
Witboost Computational Governance API (1.1.0)
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.
Evaluate a resource against all policy that apply to its resource_type
Authorizations:
Request Body schema: application/jsonrequired
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. |
Responses
Request samples
- Payload
{- "id": "string",
- "displayName": "string",
- "version": "string",
- "environment": "string",
- "resourceType": "string",
- "descriptor": "string",
- "labels": [
- "string"
]
}Response samples
- 202
- 400
- 500
{- "reportId": "string"
}Registers a new Metric in the Witboost Computational Governance
Authorizations:
Request Body schema: application/jsonrequired
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 |
Responses
Request samples
- Payload
{- "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"
}Response samples
- 202
- 400
- 500
{- "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"
}Retrieves the registered metrics
Authorizations:
query Parameters
| 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 |
Responses
Response samples
- 200
- 400
- 500
{- "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
}
}
}Updates a metric status in the Witboost Computational Governance
Authorizations:
path Parameters
| id required | string metric unique ID |
Request Body schema: application/jsonrequired
The desired status for the metric
| status required | string (StatusEnum) Enum: "draft" "grace" "disabled_grace" "enabled" "disabled" "deprecated" "deleted" Status of the governance entity |
Responses
Request samples
- Payload
{- "status": "draft"
}Response samples
- 202
- 400
- 500
{- "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"
}Updates a metric
Authorizations:
path Parameters
| id required | string metric unique ID |
Request Body schema: application/jsonrequired
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 |
Responses
Request samples
- Payload
{- "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"
}Response samples
- 202
- 400
- 500
{- "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"
}Clones a metric and bumps its version
Authorizations:
path Parameters
| id required | string metric unique ID |
Responses
Response samples
- 200
- 400
- 500
{- "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"
}Test a metric against its resource perimeter
Authorizations:
path Parameters
| id required | string Metric ID |
Request Body schema: application/jsonrequired
Additional options for the test
Array of objects (SelectorModel) Additional selectors to restrict the resources perimeter | |||||||
Array
| |||||||
Responses
Request samples
- Payload
{- "filters": [
- {
- "description": "string",
- "path": "string",
- "values": [
- "string"
]
}
]
}Response samples
- 202
- 400
- 404
- 500
{- "reportId": "string"
}Push a set of evaluation results for a metric in the Governance Platform
Authorizations:
path Parameters
| id required | string passive metric unique ID |
query Parameters
| environment required | string Environment to which these evaluation correspond to |
Request Body schema: application/jsonrequired
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) |
Responses
Request samples
- Payload
[- {
- "resource": {
- "id": "string",
- "displayName": "string",
- "descriptor": "string"
}, - "result": {
- "value": 0,
- "errors": [
- "string"
], - "details": { }
}
}
]Response samples
- 201
- 400
- 422
- 500
{- "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"
}Registers a new Policy in the Witboost Computational Governance
Authorizations:
Request Body schema: application/jsonrequired
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 |
Responses
Request samples
- Payload
{- "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"
}Response samples
- 202
- 400
- 500
{- "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"
}Retrieves the registered policies
Authorizations:
query Parameters
| 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 |
Responses
Response samples
- 200
- 400
- 500
{- "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
}
}
}Updates a policy status
Authorizations:
path Parameters
| id required | string policy unique ID |
Request Body schema: application/jsonrequired
The desired status for the policy
| status required | string (StatusEnum) Enum: "draft" "grace" "disabled_grace" "enabled" "disabled" "deprecated" "deleted" Status of the governance entity |
Responses
Request samples
- Payload
{- "status": "draft"
}Response samples
- 202
- 400
- 500
{- "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"
}Test a policy against its resource perimeter or a given resource.
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
Authorizations:
path Parameters
| id required | string Policy ID |
Request Body schema: application/jsonrequired
Additional options for the test
Array of objects (SelectorModel) Additional selectors to restrict the resources perimeter | |
object (ResourceEvaluationModel) |
Responses
Request samples
- Payload
When the request body is empty, the policy is tested against its resource perimeter.
{ }Response samples
- 202
- 400
- 404
- 500
{- "reportId": "string"
}Updates a policy
Authorizations:
path Parameters
| id required | string policy unique ID |
Request Body schema: application/jsonrequired
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 |
Responses
Request samples
- Payload
{- "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"
}Response samples
- 202
- 400
- 500
{- "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"
}Clones a policy and bumps its version
Authorizations:
path Parameters
| id required | string policy unique ID |
Responses
Response samples
- 200
- 400
- 500
{- "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"
}Push a set of evaluation results for a policy in the Governance Platform
Authorizations:
path Parameters
| id required | string passive policy unique ID |
query Parameters
| environment required | string Environment to which these evaluation correspond to |
Request Body schema: application/jsonrequired
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) |
Responses
Request samples
- Payload
[- {
- "resource": {
- "id": "string",
- "displayName": "string",
- "descriptor": "string"
}, - "result": {
- "satisfiesPolicy": true,
- "errors": [
- "string"
], - "details": { }
}
}
]Response samples
- 201
- 400
- 422
- 500
{- "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"
}Get an evaluation report by ID
Authorizations:
path Parameters
| id required | string Report id |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "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"
}Get an evaluation report status by ID
Authorizations:
path Parameters
| id required | string Report id |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "id": "string",
- "environment": "string",
- "evaluationScope": "evaluation",
- "creationTime": "2019-08-24T14:15:22Z",
- "updateTime": "2019-08-24T14:15:22Z",
- "status": "completedWithSuccess"
}Find and schedule active policies with an attached cron expression
Authorizations:
Responses
Response samples
- 500
{- "error": "string",
- "code": "string",
- "userMessage": "string",
- "input": "string",
- "inputErrorField": "string",
- "moreInfo": {
- "problems": [
- "string"
], - "solutions": [
- "string"
]
}
}Registers or updates a resource type
Authorizations:
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
{- "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"
}Response samples
- 200
- 400
- 500
{- "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"
}Retrieves the configuration of a resource type
Authorizations:
path Parameters
| resourceType required | string Example: my-resource-type Resource type name |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "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"
}Computes a list of policies with the highest failure rate in a given date interval
Authorizations:
Request Body schema: application/jsonrequired
| 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) |
Responses
Request samples
- Payload
{- "environment": "string",
- "limit": 10,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "includePolicyDetails": false
}Response samples
- 200
- 400
- 500
[- {
- "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"
}
}
]Computes policy execution stats
Authorizations:
Request Body schema: application/jsonrequired
| 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) |
Responses
Request samples
- Payload
{- "environment": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z"
}Response samples
- 200
- 400
- 500
[- {
- "resourceType": "string",
- "failed": 0,
- "total": 0,
- "noResult": 0
}
]Computes failed policy evaluation stats
Authorizations:
Request Body schema: application/jsonrequired
| 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 |
Responses
Request samples
- Payload
{- "environment": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "reportLabels": [
- "deployment"
]
}Response samples
- 200
- 400
- 500
[- {
- "resourceType": "string",
- "failedEvaluations": 0
}
]Registers new resources
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.
Authorizations:
Request Body schema: application/jsonrequired
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. |
Responses
Request samples
- Payload
{- "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"
}
]
}Response samples
- 200
- 400
- 500
{- "registeredResources": [
- {
- "resourceExternalId": "urn:dmb:dp:my-domain:my-resource:0",
- "environment": "development"
}
]
}Returns a registered resource
Authorizations:
path Parameters
| externalId required | string Example: urn:dmb:dp:my-domain:my-resource:0 Resource external id |
query Parameters
| environment required | string Example: environment=development Resource environment |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "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
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.
Authorizations:
path Parameters
| 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 |
query Parameters
| environment required | string Example: environment=development Resource environment |
Request Body schema: application/jsonrequired
object If
| |
object If |
Responses
Request samples
- Payload
{- "resultScheduling": {
- "newValue": {
- "frequency": "0 0 0,12 ? * *",
- "toleranceWindowLength": "PT1H"
}
}, - "lastResultId": {
- "newValue": "3580fd57-c673-4682-891e-eccb20b7a2d4"
}
}Response samples
- 200
- 400
- 500
{- "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"
}Retrieves the evaluation status of one or more resources
Authorizations:
Request Body schema: application/jsonrequired
required | object (FindResourceStatusRequestFilters) |
required | object (FindResourceStatusRequestResultOptions) |
Responses
Request samples
- Payload
{- "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=="
}
}
}Response samples
- 200
- 400
- 500
{- "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=="
}
}
}Analyzes an evaluation report to update the evaluation status of one or more resources
Authorizations:
path Parameters
| reportId required | string Evaluation report id |
Responses
Response samples
- 400
- 500
{- "errors": [
- "string"
], - "code": "string",
- "userMessage": "string",
- "input": "string",
- "inputErrorField": "string",
- "moreInfo": {
- "problems": [
- "string"
], - "solutions": [
- "string"
]
}
}