Typical Customizations

Version 23.0.9145


Typical Customizations


Data source resources are defined in simple, text-based schemas that are easy to extend. This topic describes some commonly-used modifications. To edit a schema, click Settings > Resources and click the Edit button for the resource you want to modify.

Remove Column

Deleting an attr element from api:info removes the column from the resource. This means that your APIs does 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 Resource Column

To rename a resource 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 Resource

You can rename a resource by changing the name of the resource .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 any given resource. This makes it easy to switch from a sandbox to a production instance.

Any changes you make to the connection in the administration console are picked up by all resources 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>