Redgate Data Modeler

Download a Physical Data Model as XML

Our API allows users to download their physical models as XML files. Downloading a model follows the same pattern as the document tree example. It is a GET HTTP request to the URL of the model with the following parameters:

    1. An accept header with an XML mime type: Accept: text/xml
    2. An authorization header with a username equal to $TOKEN and an empty password, in the following format: Authorization: Basic (base64($TOKEN:))

The corresponding curl example:

curl  -u "$TOKEN:" -H "Accept: text/xml" https://datamodeler.redgate-platform.com/model/$MODEL_ID > model.xml

In the above example, a physical model is saved in the XML format with the name model.xml.

Download a Physical Data Model as an SQL Script

Users can also download SQL scripts generated from their models. To generate an SQL script through the API please, change the header in the previous example to Accept: text/sql

The corresponding curl example:

curl -u "$TOKEN:" -H "Accept: text/sql" https://datamodeler.redgate-platform.com/model/$MODEL_ID > model.sql

The above example saves the DDL script generated from the physical model as the model.sql text file.


Didn't find what you were looking for?