Accessing Data
Published 27 August 2025
Redgate Data Modeler’s document-oriented API functionality allows users to easily fetch:
- Lists of models and SQL scripts as a document tree in the JSON format.
- A physical data model as an XML file or a corresponding SQL result.
- A logical data model as an XML file.
- An SQL script.
- A migration script.
Examples
All the following examples use the curl tool. We assumed there is a “$TOKEN” variable available, which stores the public token generated as described in an earlier section of this article. A “:” character in the user parameter (-u option) is intended.
You can use the following command to declare the “$TOKEN” variable:
|
Download a Document Tree
To fetch a document tree, we need to make a GET HTTPS request to https://datamodeler.redgate-platform.com/drive with the following HTTP headers:
- An accept header with a JSON mime type:
Accept: application/json - An authorization header with a username equal to
$TOKENand an empty password, in the following format:Authorization: Basic (base64($TOKEN:))
Here is the corresponding curl example:
|
The result is a JSON file with a list of the documents (logical and physical models, SQL scripts to which you have access) in your Redgate Data Modeler account. Please note that the link property is a valid document URL and can be used for further requests.