Skip to main content
POST
/
v0
/
data-assets
/
check-compliance
Check list of data assets for contract violations
curl --request POST \
  --url https://{hostname}.gable.ai/v0/data-assets/check-compliance \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "assets": [
    {
      "source_type": "postgres",
      "data_asset_resource_name": {
        "source_type": "postgres",
        "data_source": "<string>",
        "path": "<string>"
      },
      "schema": {
        "type": "struct",
        "name": "<string>",
        "fields": [
          {
            "type": "struct",
            "name": "<string>",
            "fields": "<array>",
            "alias": "<string>",
            "doc": "<string>",
            "logical": "<string>",
            "optional": true
          }
        ],
        "alias": "<string>",
        "doc": "<string>",
        "logical": "<string>"
      },
      "fieldNameToDataAssetFieldProfileMap": {}
    }
  ],
  "responseType": "DETAILED",
  "includeUnchangedAssets": false,
  "prLink": "<string>"
}
'
[
  {
    "dataAssetNamespace": "<string>",
    "dataAssetResourceName": "<string>",
    "dataAssetPath": "<string>",
    "responseType": "NO_CONTRACT"
  }
]

Authorizations

X-API-KEY
string
header
required

Body

application/json

List of data assets to check

assets
object[]
required

Array of data assets to check compliance for

responseType
enum<string>
required

Determines the format of the response from the API. Specifying 'DETAILED' will return a detailed JSON object for each data asset checked. If 'COMMENT_MARKDOWN' is specified, the response will be a markdown string intended to be used as a comment in a pull request.

Available options:
DETAILED,
COMMENT_MARKDOWN
includeUnchangedAssets
boolean
default:false

If true, the data assets sent that have not changed compared with the stored assets will be checked for contract violations. If false, the only data assets that have changed compared with the stored assets will be checked for contract violations.

(optional) Link to the pull request the proposed changes to the data asset are part of

Response

Data Asset ID

dataAssetNamespace
string
required

The namespace of the data asset

Examples:

"postgres://service-one.aaa.eu-west-1.rds.amazonaws.com:5432"

"protobuf://github.com/org/repo/path/to/file.proto"

dataAssetResourceName
string
required

The full resource name of the data asset, see Data Assets

Examples:

"postgres://service-one.aaa.eu-west-1.rds.amazonaws.com:5432:serviceone.public.sales"

"protobuf://[email protected]/org/repo/path/to/file.proto:company.serviceone.Sales"

dataAssetPath
string
required

The relative path of the data asset within its data store

Examples:

"serviceone.public.sales"

"company.serviceone.Sales"

responseType
enum<string>
required
Available options:
NO_CONTRACT