Using field aliases
Field aliases provide a simple way to replace raw SQL field names with user-friendly API names.
Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
API Docs Screenshot
Example - Replace verbose SQL field name with field alias and use field alias in an API call.
Say we have a 'contact' table with long capitalized field names that are unusable in API calls. We need to get postal codes from the contact table, and would prefer to use 'postal_code' as a parameter in the API, instead of the raw SQL field name
Now we can make API calls to the 'contact' table and GET postal codes with the API-friendly 'postal_code' alias.
- Table name: contact
- Fields parameter in API call:
- Request URL: