Return Metadata About All Tables

get

/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 Top

Response

Supported Media Types

200 Response

Metadata for all the tables in the schema

Body ()
An array of table descriptions
Root Schema : tableInfoArray
Type: array
Minimum Number of Items: 0
An array of table descriptions
Show Source
Nested Schema : tableInfoRead
Type: object
Database table metadata (read-only).
Match All
Show Source
Nested Schema : tableInfo
Type: object
Database table metadata
Show Source
  • columns
    Minimum Number of Items: 0
    The database table columns.
  • 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
    Minimum Number of Items: 0
    The 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
    Minimum Number of Items: 0
    The columns that must be set with non-null values. These columns are created with the `NOT NULL` constraint.
Nested Schema : tableInfoRead-allOf[1]
Type: object
Show Source
Nested Schema : columns
Type: array
Minimum Number of Items: 0
The database table columns.
Show Source
Nested Schema : primaryKeys
Type: array
Minimum Number of Items: 0
The 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.
Show Source
Nested Schema : requiredColumns
Type: array
Minimum Number of Items: 0
The columns that must be set with non-null values. These columns are created with the `NOT NULL` constraint.
Show Source
Nested Schema : columnInfo
Type: object
Database column metadata.
Show Source
  • The column name.
  • 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.
  • For `decimal` columns, the scale of the column, meaning the number of places after the decimal point.
  • 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`).
Nested Schema : indexes
Type: array
Minimum Number of Items: 0
The database table indexes.
Show Source
Nested Schema : index
Type: object
The table index metadata.
Show Source
Nested Schema : indexColumns
Type: array
Minimum Number of Items: 1
Unique Items Required: true
The indexed columns.
Show Source
Back to Top

Examples

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"
                ]
            }
        ]
    }
]
Back to Top