Create a table
To create a new table, use the HTTP POST method. The POST body must contain a single valid table representation, which includes an identifier that is the table name.
Component | Description |
---|---|
HTTP method |
POST |
URL |
https://host/fmi/odata/version/database-name/FileMaker_Tables host – FileMaker Cloud or FileMaker Server host name version – the OData version, always database-name – the name of the hosted database Example: |
Parameters |
JSON example Copy
Atom example: Copy
|
FileMaker information
-
FileMaker_Tables is a system table used for creating, modifying, and deleting tables. The
type
parameter is one of the following types: NUMERIC, DECIMAL, INT, DATE, TIME, TIMESTAMP, VARCHAR, CHARACTER VARYING, BLOB, VARBINARY, LONGVARBINARY, or BINARY VARYING. -
Repetitions are specified in brackets after the type (for example,
"INT[4]"
). You can specify the maximum length of a text field in parentheses (for example,"VARCHAR(200)"
). -
When you create a new table and specify NULL as the default type, the keyword value defaults to TIMESTAMP.
-
Optional parameters are used with the field name and field type:
-
"primary"
: true or false (whether the field is a primary key; default is false) -
"unique"
: true or false (whether the field must have a unique value; default is false) -
"global"
: true or false (whether the field is global; default is false) -
"default"
: a string containing a keyword that's appropriate for the data type; valid keywords are USER, USERNAME, CURRENT_USER, CURRENT_DATE, CURDATE, CURRENT_TIME, CURTIME, CURRENT_TIMESTAMP, and CURTIMESTAMP -
"externalSecurePath"
(container field only): a string containing a relative path for secure files in "externalSecurePath". Exclude the "[database location]/" portion of the base directory. Be sure to set this for each FileMaker Pro database in FileMaker Pro. See FileMaker Pro Help.
-