Typical Customizations
Version 25.3.9411
Version 25.3.9411
Typical Customizations
Data source tables and stored procedures are defined in simple, text-based schemas that are easy to extend. You can make a number of these modifications from the API Server UI by navigating to the API page and clicking the link to the schema you need to change. Alternatively, open the .rsd or .rsb file that you need to edit with a text editor. Tables are written to .rsd files; Stored Procedures are written to .rsb files. Find these files in the api subfolder of the application root. This topic describes how to make some common modifications by editing .rsd files.
Remove Column
Deleting an attr element from api:info removes the column from the table. This means that your APIs do not list the column, and that your cache does not contain the column.
Important: Delete the entire XML element for the column that you want to remove.
Change Column Data Type
To change a column’s data type, change the xs:type attribute to one of the supported data types:
- string
- datetime
- boolean
- int
- long
- double
Rename Column
To rename a column, add an alias attribute that contains the new column name. You cannot change the name attribute. This value must remain consistent for API Server to maintain the mapping to the correct column in the underlying data source.
This example renames the Type column to APIsType:
<api:info>
<attr name="Type" alias="APIsType" xs:type="string" columnsize="40" readonly="True" key="False" />
...
</api:info>
Rename Table
You can rename a table by changing the name of the table .rsd file in the api subfolder of the application root.
Note: The title attribute in api:info must remain the same as the name of the table in the underlying data source.
Change Data Source Connection
You can use the connection attribute in api:info to change the connection for a table or stored procedure. This makes it easy to switch from a sandbox to a production instance.
Any changes you make to a connection on the application Connections page are picked up by all tables and stored procedures that reference the same connection in api:info.
<api:info title="case" description="Create, Update, Query, and Delete the SQLite Cars database." connection="SQLiteCars">
...
</api:info>