GET
/
v0
/
contracts
cURL
curl --request GET \
  --url 'https://api-(organization).gable.ai/v0/contracts'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "parentRowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version": "<string>",
    "status": "ACTIVE",
    "gitHash": "<string>",
    "gitRepo": "<string>",
    "gitUser": "<string>",
    "fileUri": "<string>",
    "filePath": "<string>",
    "reviewers": [
      "<string>"
    ],
    "mergedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "contractSpec": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dataAssetResourceName": "<string>",
      "dataAssetResourceNameList": [
        "<string>"
      ],
      "doc": "<string>",
      "name": "<string>",
      "namespace": "<string>",
      "owner": "jsmith@example.com",
      "restrictPii": true,
      "schema": [
        {
          "type": "struct",
          "name": "<string>",
          "fields": [
            {
              "type": "struct",
              "name": "<string>",
              "fields": [
                "<any>"
              ],
              "alias": "<string>",
              "doc": "<string>",
              "logical": "<string>",
              "optional": true
            }
          ],
          "alias": "<string>",
          "doc": "<string>",
          "logical": "<string>",
          "optional": true,
          "constraints": {}
        }
      ]
    },
    "contractSpecRaw": "<string>",
    "enforcementLevel": "RECORD",
    "lastEditorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "lastEditorEmail": "<string>",
    "lastEditorFirstName": "<string>",
    "lastEditorLastName": "<string>",
    "lastEditorGithubHandle": "<string>",
    "violations": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "eventTitle": "<string>",
        "timestamp": "2023-11-07T05:31:56Z",
        "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "contractVersion": "<string>",
        "contractFieldName": "<string>",
        "contractName": "<string>",
        "contractDomain": "<string>",
        "dataAssetFieldProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "entityType": "DATA_CONTRACT",
        "eventType": "VIOLATION",
        "violationType": "MISSING_REQUIRED_PROPERTY",
        "dataAssetResourceName": "<string>",
        "expectedValue": "<string>",
        "actualValue": "<string>",
        "prLink": "<string>"
      }
    ],
    "contractSpecFieldToViolationStatusMapping": {}
  }
]

Query Parameters

resourcesLocation
string

Location of the data assets resources (e.g. '{host}:{port}.{database}.{schema}' for database resources)

sourceType
enum<string>

Source type of the data assets (e.g. 'postgres', 'mysql', 'avro', 'protobuf', 'json_schema', etc.)

Available options:
postgres,
mysql,
mssql,
json_schema,
avro,
protobuf,
python,
pyspark,
typescript,
java,
s3,
dataframe,
kotlin,
swift,
php
limit
integer

The limit used for offset-based pagination

offset
integer

The offset used for offset-based pagination

status
string

The status of the contract

Response

200
application/json

All data contracts (filtered by query parameters if provided)

The response is of type object[].