# The `api/db/<dbname>/schema` Resource

> The `api/db/<dbname>/schema` resource shows the schema of the specified database.

> ### For an overview see page eXtremeDB Web Service Resources

> With the REST server started (listening on port 8083), the following http request will return the database schema in JSON format:

>         http://localhost:8083/api/db/diskdb/schema

> The `schema` object displays the array of `classes` and `structs` defined for the database. Each class contains the array of `fields`, `indexes` and `events`. For example, the output for the above request will be as follows:

>         {
>           "schema":
>           {
>             "classes":
>             [
>               "struct_no": 0,
>               "name": "Employee",
>               "flags": 17,
>               "flags_s":
>               [
>                 "MCO_DICT_SI_CLASS",
>                 "MCO_DICT_SI_PERSISTENT"
>               ],
>               "class_code": 1,
>               "fields":
>               [
>                 {
>                   "field_no": 0,
>                   "name": "name",
>                   "type": 16,
>                   "type_s": "MCO_DD_STRING",
>                   "flags": 2,
>                   "flags_s":
>                   [
>                     "MCO_DICT_FI_INDEXED"
>                   ]
>                 },
>                 {
>                   "field_no": 1,
>                   "name": "dept_no",
>                   "type": 1,
>                   "type_s": "MCO_DD_UINT2",
>                   "flags": 2,
>                   "flags_s":
>                   [
>                     "MCO_DICT_FI_INDEXED"
>                   ]
>                 }
>               ],
>               "indexes":
>               [
>                 {
>                   "index_no": 0,
>                   "name": "Iname",
>                   "flags": 17,
>                   "flags_s":
>                   [
>                     "MCO_DICT_II_UNIQUE",
>                     "MCO_DICT_II_TREE"
>                   ],
>                   "index": 0,
>                   "n_keys_estimate": 0,
>                   "fields":
>                   [
>                     {
>                       "ifield_no": 0,
>                       "field_no": 0,
>                       "coll_no": -1
>                     }
>                   ]
>                 },
>                 {
>                   "index_no": 1,
>                   "name": "Idept",
>                   "flags": 16,
>                   "flags_s":
>                   [
>                     "MCO_DICT_II_TREE"
>                   ],
>                   "index": 1,
>                   "n_keys_estimate": 0,
>                   "fields":
>                   [
>                     {
>                       "ifield_no": 0,
>                       "field_no": 1,
>                       "coll_no": -1
>                     }
>                   ]
>                 }
>               ],
>               "events":
>               [
>               ]
>             }
>           ]
>           "structs":
>           [
>           ]
>         }
>       }