Before you go on and map a field from your database to a Telerik Platform content type field, you may want to fetch the full list of fields from your database. This operation is only possible with master key authentication.
To read content type fields after they are mapped, use the read operation for fields.
Use the following request to read source fields from a database table connected through a Data Connector:
var masterKey = "your-master-key"; var appId = "your-app-id"; var account = new EverliveAccount(new EverliveAccountSettings(AuthorizationStrategy.MasterKey, masterKey)); var sourceFields = account.WorkWith().Application(appId). DataLink(dataConnectorId). SourceType(sourceTypeName). Fields().GetAll(). ExecuteSync();
The next table explains the structure of the result.
|SourceFieldName||The field name as it appears in the source database.|
|DataType||The Telerik Platform data type to which the source field will be mapped. Supported field types depend on the source database type.|
|IsIdentity||Shows if the source field is a unique key or not.|
|IsReadOnly||Shows if the source field is protected from writing.|
- Managing Data Connectors Using the Administration API
- Introduction to Data Connectors
- Data Connectors Object Fields Reference