---
updatedAt: 2026-07-27T18:56:42.000Z
agentTools:
  projectIndex: https://developers.sqldbm.com/llms.txt
---

# Update DG fields from last revision

Creates, updates and deletes DG fields on the latest revision. Requires an Enterprise plan. Request
bodies may be sent compressed; the limit is 15 MB on the wire and 100 MB once decompressed.

# OpenAPI definition

```json
{
  "openapi": "3.0.4",
  "info": {
    "title": "SqlDBM.OpenAPI",
    "description": "Requests are authorised with a bearer token. Endpoints that create something return 202 and finish the work\nafter responding.\n\nRequest bodies may be compressed with gzip, deflate, br (Brotli) or zstd using the Content-Encoding header.\nThe limit is 15 MB on the wire and 100 MB once decompressed. File uploads state their own limit.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.sqldbm.com"
    }
  ],
  "paths": {
    "/projects/{projectId}/revisions/last/fields": {
      "post": {
        "tags": [
          "Create, update and delete revision data governance fields"
        ],
        "summary": "Update DG fields from last revision",
        "description": "Creates, updates and deletes DG fields on the latest revision. Requires an Enterprise plan. Request\nbodies may be sent compressed; the limit is 15 MB on the wire and 100 MB once decompressed.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "strictMode",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataGovernanceFieldsRequest"
              },
              "example": {
                "create": [
                  {
                    "$type": "TextField",
                    "defaultText": "Some default text or null for none",
                    "bindings": {
                      "5b44a102-8e25-4509-9239-bb128ba06777": {
                        "text": "Per object field's value"
                      }
                    },
                    "name": "Text field example",
                    "includeAsDbtMeta": true,
                    "applicableTo": "ApplicableToColumns"
                  }
                ],
                "update": {
                  "0ee1f05a-c1f6-4f74-9a7a-871779871d30": {
                    "$type": "SelectorField",
                    "values": {
                      "b27b8b67-d1fa-41f9-9a3e-0b32d45e2a45": "Option A",
                      "cfe5768e-6fb8-4b73-9d0f-02f9f1586546": "Option B"
                    },
                    "defaultValue": "b27b8b67-d1fa-41f9-9a3e-0b32d45e2a45",
                    "bindings": {
                      "0f9d24d1-f436-4841-85ed-67915f9c187a": {
                        "valueId": "cfe5768e-6fb8-4b73-9d0f-02f9f1586546"
                      }
                    },
                    "name": "Selector field example",
                    "includeAsDbtMeta": true,
                    "applicableTo": "All"
                  }
                },
                "delete": [
                  "27df664e-3937-47eb-929a-0645337c6f92"
                ],
                "revisionName": "Update data governance fields"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Data governance fields update accepted"
          },
          "400": {
            "description": "The API call was not formed correctly",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 400,
                  "type": "Invalid_Syntax",
                  "message": "The API call was not formed correctly"
                }
              }
            }
          },
          "401": {
            "description": "The API call was not made by an authorized agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 401,
                  "type": "Unauthorized",
                  "message": "The API call was not made by an authorized agent"
                }
              }
            }
          },
          "403": {
            "description": "Requires an Enterprise plan and project edit permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 403,
                  "type": "Forbidden",
                  "message": "Requires an Enterprise plan and project edit permission"
                }
              }
            }
          },
          "404": {
            "description": "Project, revision, or object not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 404,
                  "type": "Not_Found",
                  "message": "Project, revision, or object not found"
                }
              }
            }
          },
          "409": {
            "description": "Project is locked by another user. Use strictMode to override",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 409,
                  "type": "Conflict",
                  "message": "Project is locked by another user. Use strictMode to override"
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 415,
                  "type": "UnsupportedMediaType",
                  "message": "Use application/json"
                }
              }
            }
          },
          "422": {
            "description": "Request has no operations or contains invalid field definitions or bindings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 422,
                  "type": "UnprocessableEntity",
                  "message": "Request has no operations or contains invalid field definitions or bindings"
                }
              }
            }
          },
          "429": {
            "description": "The request was rejected due to high inbound volume",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 429,
                  "type": "Too_Many_Requests",
                  "message": "The request was rejected due to high inbound volume"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error has occurred and will require support",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": 500,
                  "type": "Server_Error",
                  "message": "An unexpected error has occurred and will require support"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CheckboxBinding": {
        "required": [
          "isChecked"
        ],
        "type": "object",
        "properties": {
          "isChecked": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CheckboxField": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DataGovernanceField"
          },
          {
            "required": [
              "bindings",
              "checkedByDefault",
              "showInHeader"
            ],
            "type": "object",
            "properties": {
              "bindings": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/CheckboxBinding"
                }
              },
              "checkedByDefault": {
                "type": "boolean"
              },
              "showInHeader": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "DataGovernanceField": {
        "required": [
          "$type",
          "applicableTo",
          "includeAsDbtMeta",
          "name"
        ],
        "type": "object",
        "properties": {
          "$type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "includeAsDbtMeta": {
            "type": "boolean"
          },
          "applicableTo": {
            "enum": [
              "applicableToObjects",
              "applicableToColumns",
              "all"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false,
        "discriminator": {
          "propertyName": "$type",
          "mapping": {
            "TextField": "#/components/schemas/TextField",
            "CheckboxField": "#/components/schemas/CheckboxField",
            "UrlField": "#/components/schemas/UrlField",
            "SelectorField": "#/components/schemas/SelectorField",
            "MultiSelectorField": "#/components/schemas/MultiSelectorField"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Standard error response returned by the API for non-2xx status codes."
      },
      "MultiSelectorBinding": {
        "required": [
          "valueIds"
        ],
        "type": "object",
        "properties": {
          "valueIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "additionalProperties": false
      },
      "MultiSelectorField": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DataGovernanceField"
          },
          {
            "required": [
              "bindings",
              "values"
            ],
            "type": "object",
            "properties": {
              "bindings": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/MultiSelectorBinding"
                }
              },
              "values": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "SelectorBinding": {
        "required": [
          "valueId"
        ],
        "type": "object",
        "properties": {
          "valueId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "SelectorField": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DataGovernanceField"
          },
          {
            "required": [
              "bindings",
              "values"
            ],
            "type": "object",
            "properties": {
              "bindings": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/SelectorBinding"
                }
              },
              "values": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "defaultValue": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "TextBinding": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TextField": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DataGovernanceField"
          },
          {
            "required": [
              "bindings"
            ],
            "type": "object",
            "properties": {
              "bindings": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/TextBinding"
                }
              },
              "defaultText": {
                "type": "string",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "UpdateDataGovernanceFieldsRequest": {
        "type": "object",
        "properties": {
          "create": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TextField"
                },
                {
                  "$ref": "#/components/schemas/CheckboxField"
                },
                {
                  "$ref": "#/components/schemas/UrlField"
                },
                {
                  "$ref": "#/components/schemas/SelectorField"
                },
                {
                  "$ref": "#/components/schemas/MultiSelectorField"
                }
              ]
            },
            "nullable": true
          },
          "update": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TextField"
                },
                {
                  "$ref": "#/components/schemas/CheckboxField"
                },
                {
                  "$ref": "#/components/schemas/UrlField"
                },
                {
                  "$ref": "#/components/schemas/SelectorField"
                },
                {
                  "$ref": "#/components/schemas/MultiSelectorField"
                }
              ]
            },
            "nullable": true
          },
          "delete": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "revisionName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UrlBinding": {
        "required": [
          "url",
          "urlDisplayName"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "urlDisplayName": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UrlField": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DataGovernanceField"
          },
          {
            "required": [
              "bindings"
            ],
            "type": "object",
            "properties": {
              "bindings": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/UrlBinding"
                }
              },
              "defaultUrl": {
                "type": "string",
                "nullable": true
              },
              "defaultUrlDisplayName": {
                "type": "string",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "securitySchemes": {
      "OpenApiBearerAuthentication": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "OpenApiBearerAuthentication": []
    }
  ],
  "tags": [
    {
      "name": "Create, update and delete revision data governance fields"
    }
  ]
}
```