Skip to content

Alter Metadata

POST
/api/v1/codegen/alter-metadata
curl --request POST \
--url https://example.com/api/v1/codegen/alter-metadata \
--header 'Content-Type: application/json' \
--data '{ "table_name": "example", "table_comment": "example", "columns": [ { "name": "example", "comment": "example" } ], "requested_by": "example" }'

Generate SQL for metadata/comment updates.

X-Environment-Id
Any of:
string
Media typeapplication/json
MetadataAlterInput

Input model for metadata/comment alterations.

object
table_name
required
Table Name
string
table_comment
Any of:
string
columns
Columns
Array<object>
ColumnMetadataChange

Column comment update payload.

object
name
required
Name
string
comment
Any of:
string
requested_by
required
Requested By
string
Examplegenerated
{
"table_name": "example",
"table_comment": "example",
"columns": [
{
"name": "example",
"comment": "example"
}
],
"requested_by": "example"
}

Successful Response

Media typeapplication/json
CodegenResponse

Standard response for all codegen endpoints.

object
status
Status
string
default: success
Allowed values: success error
artifacts
required
Artifacts
Array<object>
ArtifactOutput

Standard artifact output format.

object
path
required
Path
string
content
required
Content
string
file_type
Any of:
string
is_base64
Is Base64
boolean
metadata
Any of:
object
key
additional properties
any
errors
Errors
Array<string>
Example
{
"status": "success",
"artifacts": [
{
"is_base64": false
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}