CreateSchema
Generates a schema file that defines the structure of API responses, mapping fields and data types for integration with REST services.
CreateSchema
Creates a local schema file (.rsd) from an existing table or view in the data model.
The schema file is created in the directory set in the Location connection property when this procedure is executed. You can edit the file to include or exclude columns, rename columns, or adjust column datatypes.
The connector checks the Location to determine if the names of any .rsd files match a table or view in the data model. If there is a duplicate, the schema file will take precedence over the default instance of this table in the data model. If a schema file is present in Location that does not match an existing table or view, a new table or view entry is added to the data model of the connector.
Input
| Name | Type | Description |
| TableName | String | The name of the table for which the schema will be created. |
| Format | String | Specifies the format of the returned data, such as JSON, XML, or CSV.
The allowed values are XML, JSON, CSV. |
| URI | String | The URL or endpoint of the API resource from which the schema will be generated. |
| XPath | String | For XML or JSON responses: Defines the path to elements that repeat at the same level in the document, allowing structured data extraction into multiple rows. |
| WriteToFile | String | Indicates whether the schema should be saved as a file. Defaults to 'true'. Set to 'false' to output the schema as a stream using FileStream or FileData. |
| FileName | String | The full path and name of the file where the generated schema will be saved. |
| Method | String | The HTTP method to use when requesting data, such as GET, POST, PUT, or DELETE. |
| ContentType | String | The Content-Type header to include in the request when sending data in the body (for example, application/json or application/xml). |
| Data | String | The payload to be included in the request body when using methods like POST or PUT. |
Result Set Columns
| Name | Type | Description |
| Result | String | Indicates whether the schema creation was successful ('Success') or failed ('Failure'). |
| FileData | String | Returns the schema content as a base64-encoded string. Only provided when WriteToFile is set to 'false' and FileStream is not used. |