Skip to main content
POST
/
v0
/
data-assets
Creates or updates data assets
curl --request POST \
  --url https://{hostname}.gable.ai/v0/data-assets \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
[
  {
    "dataAssetResourceName": "<string>",
    "domain": "<string>",
    "path": "<string>",
    "type": "postgres",
    "fields": [
      {
        "name": "<string>",
        "nativeDataType": "<string>",
        "type": {},
        "description": "<string>",
        "order": 123,
        "parentFieldId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "changeSummary": "<string>",
        "changeDescription": "<string>"
      }
    ],
    "description": "<string>",
    "rawSchema": "<string>",
    "prLink": "https://github.com/fakeorg/fakerepo/pull/123"
  }
]
'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "dataAssetResourceName": "<string>",
    "newVersionCreated": true
  }
]

Authorizations

X-API-KEY
string
header
required

Body

application/json
dataAssetResourceName
string
required

The unique identifier of the data asset. It follows the pattern '{data_asset_type}://{data_asset_source}:{data_asset_name}'

domain
string
required

The domain or category to which the data asset belongs.

path
string
required

The name or path identifying the data asset.

type
enum<string>
required

The type of the source data asset, indicating its source or format (e.g., postgres, protobuf).

Available options:
postgres,
mysql,
mssql,
json_schema,
avro,
protobuf,
python,
pyspark,
typescript,
java,
s3,
dataframe,
kotlin,
swift,
php,
golang
fields
object[]
required

The fields of the data asset.

description
string

A brief description of this particular version of the data asset.

rawSchema
string

The raw schema of the data asset from the source system. This can be the contents of a schema file or data from the information schema of a database. This is used to regenerate the schema of the data asset if needed.

Link to the PR that may have added or edited the data assets

Example:

"https://github.com/fakeorg/fakerepo/pull/123"

Response

Assets created or updated successfully

id
string<uuid>
required

ID of the created or updated data asset

versionId
string<uuid>
required

Version ID of the now current data asset

dataAssetResourceName
string
required

The unique identifier of the data asset. It follows the pattern '{data_asset_type}://{data_asset_source}:{data_asset_name}'

newVersionCreated
boolean
required

Indicates whether a new version was created