Return Metadata About All Tables
/mobile/system/databaseManagement/tables
Returns metadata that describes all the tables that were created in the environment's database schema.
Note: When you use the Database Access operations to work with the table data, you'll need to know the order of the primary keys that you used when you created (or re-created) the table. However, when you call either GET /mobile/system/databaseManagement/tables or GET /mobile/system/databaseManagement/tables/{table}, the primaryKeys property lists the columns in alphabetical order, and not in the order that you used when you created or re-created the table. Therefore, you must make a note of the order when you create or re-create a table.
Permissions
Only team members with the Mobile_DbMgmt role can access the Database Management API.
Request
There are no request parameters for this operation.
Back to TopResponse
- application/json
200 Response
Metadata for all the tables in the schema
array0- 
            Array of: 
                object  tableInfoRead
            
            Database table metadata (read-only).
object- 
        
            object  tableInfo
        
        Database table metadata
- 
        
            object  tableInfoRead-allOf[1]
        
        
object- 
            columns: 
            array  columns
            
            Minimum Number of Items:0The database table columns.
- 
            name: 
            string
            The table name. This attribute is case sensitive. There are database restrictions on the maximum length of the name and which special characters are allowed. However, because the names are within double quotation marks, you can use spaces and some special characters.
- 
            primaryKeys: 
            array  primaryKeys
            
            Minimum Number of Items:0The columns to use for the primary keys. Note that when you use the Database Access operations to work with the table data, you'll need to know the order of the primary keys that you used when you created (or re-created) the table. However, when you call either `GET /mobile/system/databaseManagement/tables` or `GET /mobile/system/databaseManagement/tables/{table}`, the `primaryKeys` property lists the columns in alphabetical order, and not in the order that you used when you created or re-created the table. Therefore, you must make a note of the order when you create or re-create a table.
- 
            requiredColumns(optional): 
            array  requiredColumns
            
            Minimum Number of Items:0The columns that must be set with non-null values. These columns are created with the `NOT NULL` constraint.
object- 
            indexes(optional): 
            array  indexes
            
            Minimum Number of Items:0The database table indexes.
array0- 
            Array of: 
                object  columnInfo
            
            Database column metadata.
array0array0object- 
            name: 
            string
            The column name.
- 
            size(optional): 
            integer
            For `string`, `integer`, and `decimal` columns, the size or precision of the column. String values can't exceed 4000 characters. Unless you have a valid business constraint, you should not specify size and subsize for integers and decimals because this limits which values are acceptable and makes it hard to resize the column. When possible, allow the database to size and store the value as efficiently as possible.
- 
            subSize(optional): 
            integer
            For `decimal` columns, the scale of the column, meaning the number of places after the decimal point.
- 
            type: 
            
            Allowed Values:[ "string", "dateTime", "integer", "decimal", "boolean" ]The column type. `dateTime` is a string in ISO date and time format (for example, `2015-03-21T17:00:00.000-08:00`).
array0- 
            Array of: 
                object  index
            
            The table index metadata.
object- 
            columns: 
            array  indexColumns
            
            Minimum Number of Items:1Unique Items Required:trueThe indexed columns.
- 
            name: 
            string
            The index name.
array1trueExamples
The following example shows how to get descriptions of all the database tables by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -i -X GET -u username:password -H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce" https://fif.cloud.oracle.com/mobile/system/databaseManagement/tables
Example of Response Header
The following shows an example of the response header:
200 OK Content-Type: application/json Date: Mon, 29 Jan 2018 01:16:19 GMT
Example of Response Body
The following example shows, in JSON format, the contents of the response body, which lists the metadata for the database tables:
[
    {
        "name": "Movies",
        "primaryKeys": [
            "title"
        ],
        "requiredColumns": [
            "title",
            "releaseDate"
        ],
        "columns": [
            {
                "name": "title",
                "size": 50,
                "type": "string"
            },
            {
                "name": "synopsis",
                "size": 4000,
                "type": "string"
            },
            {
                "name": "inTheaters",
                "type": "boolean"
            },
            {
                "name": "releaseDate",
                "type": "dateTime"
            },
            {
                "name": "runningTime",
                "size": 3,
                "type": "integer"
            },
            {
                "name": "poster",
                "type": "binary"
            },
            {
                "name": "totalGross",
                "size": 10,
                "subSize": 2,
                "type": "decimal"
            },
            {
                "name": "createdBy",
                "size": 80,
                "type": "string"
            },
            {
                "name": "createdOn",
                "type": "dateTime"
            },
            {
                "name": "modifiedBy",
                "size": 80,
                "type": "string"
            },
            {
                "name": "modifiedOn",
                "type": "dateTime"
            }
        ],
        "indexes": [
            {
                "name": "Movies_pk",
                "columns": [
                    "title"
                ]
            }
        ]
    }
]